Files
mixyboos/src/app/page.tsx
2023-05-12 21:49:01 +01:00

21 lines
555 B
TypeScript

import HeroPage from "@/lib/components/pages/HeroPage";
import React from "react";
import { authOptions } from "@/server/auth";
import { getServerSession } from "next-auth";
import { redirect } from "next/navigation";
const Home = async () => {
const session = await getServerSession(authOptions);
if (session) {
redirect("/dashboard");
}
return (
<main className="flex min-h-screen flex-col items-center justify-center dark:bg-slate-800">
{session ? <h1>Hello Sailor</h1> : <HeroPage />}
</main>
);
};
export default Home;