2023-06-22 10:37:35 -07:00
|
|
|
import { auth } from '@/auth'
|
2023-06-16 11:49:14 -04:00
|
|
|
import { LoginButton } from '@/components/login-button'
|
2023-06-22 10:37:35 -07:00
|
|
|
import { redirect } from 'next/navigation'
|
2023-06-16 11:49:14 -04:00
|
|
|
|
2023-06-22 10:37:35 -07:00
|
|
|
export default async function SignInPage() {
|
|
|
|
|
const session = await auth()
|
|
|
|
|
// redirect to home if user is already logged in
|
|
|
|
|
if (session?.user) {
|
|
|
|
|
redirect('/')
|
|
|
|
|
}
|
2024-01-20 10:39:02 -06:00
|
|
|
|
2023-06-16 11:49:14 -04:00
|
|
|
return (
|
2023-06-16 21:28:44 +04:00
|
|
|
<div className="flex h-[calc(100vh-theme(spacing.16))] items-center justify-center py-10">
|
|
|
|
|
<LoginButton />
|
2023-06-16 11:49:14 -04:00
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|