mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-07-27 22:45:03 +00:00
74 lines
1.9 KiB
TypeScript
74 lines
1.9 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";
|
|
|
|
// If loading a variable font, you don't need to specify the font weight
|
|
const inter = Inter({
|
|
subsets: ["latin"],
|
|
display: "swap",
|
|
});
|
|
|
|
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"
|
|
style={{
|
|
padding: "1rem",
|
|
textAlign: "center",
|
|
borderTop: "1px solid #ccc",
|
|
marginTop: "2rem",
|
|
}}
|
|
>
|
|
<p>
|
|
© {new Date().getFullYear()} Hestia Hearth And Home. All rights
|
|
reserved. Hestia 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;
|
|
}) {
|
|
// TODO: With this, the NavBar is being applied to the route layout so across all pages, including the sign in page, which we
|
|
// possibly don't want, or at least don't want it to look exactly like this, with the same links and ability to sign out
|
|
// on small screens.
|
|
|
|
const session = await getSession();
|
|
const userImage = session?.user?.image;
|
|
|
|
return (
|
|
<html lang="en" className={inter.className}>
|
|
<body>
|
|
<Provider>
|
|
<ReactQueryProvider>
|
|
<Nav userImage={userImage} />
|
|
{children}
|
|
{/* <Footer /> */}
|
|
</ReactQueryProvider>
|
|
</Provider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|