Implemented email verification

This commit is contained in:
2024-04-12 13:52:16 +03:00
parent 78107d4ec7
commit b1ad7b5c3e
51 changed files with 604 additions and 213 deletions

View File

@@ -0,0 +1,25 @@
'use client'
import { useRouter } from 'next/navigation'
import { AUTH_LOGIN_URL } from '@/config/routes'
type Props = {
children: React.ReactNode
mode?: 'modal' | 'redirect'
asChild?: boolean
}
const LoginButton = ({
children, mode = 'redirect', asChild,
}: Props) => {
const router = useRouter()
const onClick = () => router.push(AUTH_LOGIN_URL)
if (mode === 'modal') {
return <span>TODO: Implement modal</span>
}
return <span onClick={onClick} className="cursor-pointer">{children}</span>
}
export default LoginButton