added mail service
This commit is contained in:
25
components/auth/LoginButton.tsx
Normal file
25
components/auth/LoginButton.tsx
Normal 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
|
||||
Reference in New Issue
Block a user