70 lines
2.2 KiB
TypeScript
70 lines
2.2 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 ChatFAB from "./_components/ChatFAB";
|
|
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 {MessagesProvider} from "./_providers/MessagesProvider";
|
|
import { CodeHighlightStyle } from "./_components/CodeHighlightSyle";
|
|
import { cn } from "~/lib/utils";
|
|
import AnimatedBackGroundContainer from "./_components/Animated/AnimatedBackGroundContainer";
|
|
import {SpeedInsights} from "@vercel/speed-insights/next"
|
|
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 (
|
|
<>
|
|
<SpeedInsights/>
|
|
<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>
|
|
<MessagesProvider>
|
|
<AnimatedBackGroundContainer followSpeed={0.003} particleCount={100} orbitRadius={2000}>
|
|
<TopNav />
|
|
<main className="absolute lg:top-10 h-screen lg:h-[calc(100vh-var(--spacing)*10)] w-screen">
|
|
{children}
|
|
</main>
|
|
{modal}
|
|
</AnimatedBackGroundContainer>
|
|
<ChatFAB />
|
|
</MessagesProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
</GsapProvider>
|
|
</TrpcProvider>
|
|
</ClerkProvider>
|
|
</>
|
|
);
|
|
}
|