assessment-model/src/app/page.tsx
2023-07-25 12:14:24 +01:00

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>
);
}