Skip to content

Commit

Permalink
Remove erroneous $state()
Browse files Browse the repository at this point in the history
  • Loading branch information
FyreByrd committed Feb 3, 2025
1 parent f27e2ed commit c8552e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let { data, children }: Props = $props();
let drawerToggle: HTMLInputElement = $state();
let drawerToggle: HTMLInputElement;
function closeDrawer() {
drawerToggle.click();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,36 @@
(window[('modal' + id) as any] as any).showModal();
}
let simpleSettingsFormTimeout: NodeJS.Timeout;
let simpleSettingsForm: HTMLFormElement = $state();
let simpleSettingsForm: HTMLFormElement;
function submitSimpleSettingsForm() {
if (simpleSettingsFormTimeout) {
clearTimeout(simpleSettingsFormTimeout);
}
simpleSettingsFormTimeout = setTimeout(() => {
simpleSettingsForm.requestSubmit();
simpleSettingsForm?.requestSubmit();
}, 2000);
}
let ownerSettingsFormTimeout: NodeJS.Timeout;
let ownerSettingsForm: HTMLFormElement = $state();
let ownerField: HTMLInputElement = $state();
let groupField: HTMLInputElement = $state();
let ownerSettingsForm: HTMLFormElement;
let ownerField: HTMLInputElement;
let groupField: HTMLInputElement;
function submitOwnerSettingsForm() {
if (ownerSettingsFormTimeout) {
clearTimeout(ownerSettingsFormTimeout);
}
ownerSettingsFormTimeout = setTimeout(() => {
ownerSettingsForm.requestSubmit();
ownerSettingsForm?.requestSubmit();
}, 2000);
}
let addProductModal: HTMLDialogElement | undefined = $state();
let addProductModal: HTMLDialogElement;
let selectingStore: boolean = $state(false);
let selectedProduct: number = $state(0);
let availableStores = $derived(data.stores.filter(
(s) => s.StoreTypeId === data.productsToAdd[selectedProduct]?.Workflow.StoreTypeId
));
let availableStores = $derived(
data.stores.filter(
(s) => s.StoreTypeId === data.productsToAdd[selectedProduct]?.Workflow.StoreTypeId
)
);
</script>

<div class="w-full max-w-6xl mx-auto relative">
Expand Down

0 comments on commit c8552e8

Please sign in to comment.