28 lines
751 B
TypeScript
28 lines
751 B
TypeScript
import Head from "next/head";
|
|
import { type GetServerSideProps } from "next";
|
|
|
|
import { getServerAuthSession } from "~/server/auth";
|
|
import { Layout } from "~/components/Layout";
|
|
|
|
export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|
const session = await getServerAuthSession(ctx);
|
|
|
|
if (!session) return { redirect: { destination: '/api/auth/signin', permanent: false } };
|
|
|
|
return { props: { session } };
|
|
}
|
|
|
|
export default function Home() {
|
|
return (
|
|
<>
|
|
<Head>
|
|
<title>Dashboard | MaresHQ backoffice</title>
|
|
<meta name="description" content="Generated by create-t3-app" />
|
|
<link rel="icon" href="/favicon.ico" />
|
|
</Head>
|
|
<Layout>
|
|
<div></div>
|
|
</Layout>
|
|
</>
|
|
);
|
|
}
|