added mail service

This commit is contained in:
2024-04-10 21:24:25 +03:00
parent c76d4b9717
commit 78107d4ec7
80 changed files with 3478 additions and 329 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