diff --git a/src/lib/components/AuthModal.svelte b/src/lib/components/AuthModal.svelte new file mode 100644 index 0000000..7cab036 --- /dev/null +++ b/src/lib/components/AuthModal.svelte @@ -0,0 +1,217 @@ + + + + +{#if isOpen} +
+ + +
+

+ {mode === 'signin' ? 'Sign In' : 'Create Account'} +

+
+ +
{ + if (mode === 'signup' && anonymousId) { + formData.append('anonymousId', anonymousId); + } + handleSubmit(); + return handleResult; + }} + > +
+ {#if mode === 'signup'} +
+
+ + +
+
+ + +
+
+ {/if} + +
+ + +
+ +
+ + + {#if mode === 'signup'} +

Minimum 6 characters

+ {/if} +
+
+ + {#if error} +
+

{error}

+
+ {/if} + + {#if success} +
+

{success}

+
+ {/if} + + +
+ +
+

+ {mode === 'signin' ? "Don't have an account?" : 'Already have an account?'} + +

+
+
+
+{/if} \ No newline at end of file