mirror of
https://github.com/fergalmoran/mixyboos.git
synced 2025-12-22 09:41:39 +00:00
21 lines
555 B
TypeScript
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;
|