mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-07-27 22:45:03 +00:00
31 lines
1,004 B
TypeScript
31 lines
1,004 B
TypeScript
import { getServerSession } from "next-auth/next";
|
|
import { AuthOptions } from "./api/auth/[...nextauth]/route";
|
|
import GoogleSignInButton from "./components/signin/GoogleSignInButton";
|
|
import { redirect } from "next/navigation";
|
|
import Image from "next/image";
|
|
|
|
export default async function Home() {
|
|
const session = await getServerSession(AuthOptions);
|
|
|
|
if (session?.user) {
|
|
redirect("/home");
|
|
}
|
|
|
|
return (
|
|
<section className="flex flex-col items-center justify-center min-h-screen bg-gradient-to-r from-brandblue via-hoverblue to-brandmidblue">
|
|
<div className="w-full max-w-md p-8 bg-white rounded-lg shadow-lg flex flex-col items-center">
|
|
<Image
|
|
className="mb-8"
|
|
src="/hestiaIcon.png"
|
|
alt="Logo"
|
|
height={40}
|
|
width={28}
|
|
/>
|
|
<h1 className="text-3xl font-medium text-gray-900 mb-8 text-center">
|
|
Sign in to your account
|
|
</h1>
|
|
<GoogleSignInButton />
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|