-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAuthForm.tsx
More file actions
57 lines (53 loc) · 1.82 KB
/
AuthForm.tsx
File metadata and controls
57 lines (53 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { Auth, ThemeSupa, } from '@supabase/auth-ui-react'
import { useSupabaseClient } from '@supabase/auth-helpers-react'
import { Database } from "lib/database.types";
import { useTranslation } from "next-i18next";
export function AuthForm() {
const { t } = useTranslation('common')
const supabaseClient = useSupabaseClient<Database>()
return (
<div
className='w-96
px-3
border-solid
bg-[#111329]/90
rounded-lg
fixed
right-0
top-[60px]
max-[600px]:w-72
max-[600px]:right-[20px]'>
<h1 className='text-center mt-4 text-xl'>{t('loginForm.title')}</h1>
<Auth
view='magic_link'
showLinks={false}
supabaseClient={supabaseClient}
localization={{
variables: {
magic_link: {
email_input_label: t('loginForm.emailInptLabel'),
email_input_placeholder: t('loginForm.emailInputPlaceholder'),
button_label: t('loginForm.button')
},
}
}}
appearance={{
theme: ThemeSupa,
className: {
container: "MAGIC_LINK_CONTAINER",
message: "MAGIC_LINK_MESSAGE",
},
variables: {
default: {
colors: {
inputText: 'white',
brand: '#7450F0',
brandAccent: '#7450F0'
}
}
}
}}
/>
</div>
)
}