Files
gregorlohaus.com/src/app/layout.tsx
2026-03-10 19:17:15 +01:00

60 lines
1.7 KiB
TypeScript

import "~/styles/globals.css";
import type { Metadata } from "next";
import { Geist, Inter } from "next/font/google";
import { ClerkProvider } from "@clerk/nextjs";
import { config } from "@fortawesome/fontawesome-svg-core"
import "@fortawesome/fontawesome-svg-core/styles.css"
import TopNav from "./_components/TopNav";
import TrpcProvider from "./_trpc/TrpcProvider";
// import dynamic from "next/dynamic";
// const ThemeProvider = dynamic(() => import("./_providers/ThemeProvider"),{ssr:true})
import ThemeProvider from './_providers/ThemeProvider'
import GsapProvider from "./_providers/GsapProvicer";
import { CodeHighlightStyle } from "./_components/CodeHighlightSyle";
import { cn } from "~/lib/utils";
const inter = Inter({ subsets: ['latin'], variable: '--font-sans' });
config.autoAddCss = false;
export const metadata: Metadata = {
title: "Gregor Lohaus",
description: "My Personal Website",
icons: [{ rel: "icon", url: "/GLIcon.svg" }],
};
const geist = Geist({
subsets: ["latin"],
variable: "--font-geist-sans",
});
export default async function RootLayout({
children,
modal
}: Readonly<{ children: React.ReactNode, modal: React.ReactNode }>) {
return (
<ClerkProvider>
<TrpcProvider>
<GsapProvider>
<html lang="en" className={cn(geist.variable, "font-sans", inter.variable)} suppressHydrationWarning>
<head>
<CodeHighlightStyle />
</head>
<body className="flex flex-col bg-background text-foreground">
<ThemeProvider>
<TopNav />
<main className="absolute lg:top-10 h-screen w-screen">
{children}
</main>
{modal}
</ThemeProvider>
</body>
</html>
</GsapProvider>
</TrpcProvider>
</ClerkProvider>
);
}