chatbot-template/app/sign-in/page.tsx
2023-06-22 10:37:35 -07:00

16 lines
447 B
TypeScript

import { auth } from '@/auth'
import { LoginButton } from '@/components/login-button'
import { redirect } from 'next/navigation'
export default async function SignInPage() {
const session = await auth()
// redirect to home if user is already logged in
if (session?.user) {
redirect('/')
}
return (
<div className="flex h-[calc(100vh-theme(spacing.16))] items-center justify-center py-10">
<LoginButton />
</div>
)
}