diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Pin.svelte | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/components/Pin.svelte b/src/components/Pin.svelte index 3e5769b0..86e78ac1 100644 --- a/src/components/Pin.svelte +++ b/src/components/Pin.svelte @@ -2,11 +2,10 @@ import { tick } from "svelte"; import { pin } from '$lib/store'; import { Pincode, PincodeInput } from 'svelte-pincode'; - let complete = () => {}; let pinCode = []; let pinInput; - let submit, loading; + let loading; $: pinInput && tick().then(pinInput.focusFirstInput); $: pinCode.length > 5 && ($pin = pinCode.join('')); @@ -16,7 +15,7 @@ <div class="relative top-1/3 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white space-y-5"> <h1 class="text-center text-2xl font-semibold">Please enter your PIN</h1> <div class="text-center"> - <Pincode bind:complete bind:code={pinCode} bind:this={pinInput}> + <Pincode bind:code={pinCode} bind:this={pinInput}> <PincodeInput /> <PincodeInput /> <PincodeInput /> @@ -28,7 +27,6 @@ <div class="w-full flex"> <button - bind:this={submit} type="submit" class="border-2 border-black rounded-xl font-semibold mx-auto py-3 w-40 hover:opacity-80 mx-auto" class:bg-black={loading} |
