mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-07-22 08:48:34 +00:00
65 lines
1.8 KiB
TypeScript
65 lines
1.8 KiB
TypeScript
import "./globals.css";
|
|
import Provider from "./components/Provider";
|
|
import Nav from "./components/Navbar";
|
|
import { ReactQueryProvider } from "./ReactQueryProvider";
|
|
import { AuthOptions } from "@/app/api/auth/[...nextauth]/route";
|
|
import { getServerSession } from "next-auth/next";
|
|
import { cache } from "react";
|
|
import { Inter } from "next/font/google";
|
|
import { Toaster } from "@/app/shadcn_components/ui/toaster";
|
|
import { SpeedInsights } from "@vercel/speed-insights/next";
|
|
|
|
// If loading a variable font, you don't need to specify the font weight
|
|
const inter = Inter({
|
|
subsets: ["latin"],
|
|
variable: "--font-inter",
|
|
});
|
|
|
|
export const metadata = {
|
|
title: "",
|
|
description: "Start your retrofit journey today",
|
|
};
|
|
|
|
const getSession = cache(async () => {
|
|
const session = await getServerSession(AuthOptions);
|
|
return session;
|
|
});
|
|
|
|
export function Footer() {
|
|
return (
|
|
<footer className="bg-brandblue text-white p-4 text-center border-t border-gray-300 mt-8">
|
|
<p>
|
|
© {new Date().getFullYear()} Domna. All rights reserved. Domna
|
|
proprietary IP.
|
|
</p>
|
|
<p>
|
|
All intellectual property rights are retained by the respective owners.
|
|
</p>
|
|
</footer>
|
|
);
|
|
}
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const session = await getSession();
|
|
const userImage = session?.user?.image;
|
|
|
|
return (
|
|
<html lang="en" className={inter.className}>
|
|
<body className="min-h-screen flex flex-col">
|
|
<Provider>
|
|
<ReactQueryProvider>
|
|
<Nav userImage={userImage} />
|
|
<main className="flex-grow">{children}</main>
|
|
<Toaster />
|
|
<Footer />
|
|
</ReactQueryProvider>
|
|
</Provider>
|
|
<SpeedInsights />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|