added patcher and redirect to homepage if user is logged in
This commit is contained in:
10
app/page.tsx
10
app/page.tsx
@ -1,6 +1,14 @@
|
||||
import { SignInForm } from "@/auth/components/signin/signin";
|
||||
import { getAuth } from "@/auth/queries/getauth";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
const PublicHomePage = async () => {
|
||||
const { user } = await getAuth();
|
||||
|
||||
if (user) {
|
||||
redirect("/home");
|
||||
}
|
||||
|
||||
const PublicHomePage = () => {
|
||||
return (
|
||||
<div className="flex h-screen items-center justify-center">
|
||||
<SignInForm />
|
||||
|
Reference in New Issue
Block a user