mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-28 17:20:23 +00:00
add admin checks for admin pages and run biome formating 🔨
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
This commit is contained in:
@ -11,49 +11,48 @@ import QueryProvider from "@/providers/query-provider";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "./auth";
|
||||
const barlow = Barlow({
|
||||
subsets: ["latin"],
|
||||
weight: ["100", "300", "400", "500", "600", "700", "800", "900"],
|
||||
variable: "--font-barlow",
|
||||
subsets: ["latin"],
|
||||
weight: ["100", "300", "400", "500", "600", "700", "800", "900"],
|
||||
variable: "--font-barlow",
|
||||
});
|
||||
|
||||
const bokor = Bokor({
|
||||
subsets: ["latin"],
|
||||
weight: ["400"],
|
||||
variable: "--font-bokor",
|
||||
subsets: ["latin"],
|
||||
weight: ["400"],
|
||||
variable: "--font-bokor",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "SAR Link Portal",
|
||||
description: "Sarlink Portal",
|
||||
title: "SAR Link Portal",
|
||||
description: "Sarlink Portal",
|
||||
};
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
const session = await getServerSession(authOptions);
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body className={`${barlow.variable} ${bokor.variable} antialiased font-sans bg-gray-100 dark:bg-black`}>
|
||||
<AuthProvider session={session || undefined}>
|
||||
<Provider>
|
||||
<NextTopLoader color="#f49d1b" showSpinner={false} zIndex={9999} />
|
||||
<Toaster richColors />
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<QueryProvider>
|
||||
{children}
|
||||
</QueryProvider>
|
||||
</ThemeProvider>
|
||||
</Provider>
|
||||
</AuthProvider>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
);
|
||||
const session = await getServerSession(authOptions);
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body
|
||||
className={`${barlow.variable} ${bokor.variable} antialiased font-sans bg-gray-100 dark:bg-black`}
|
||||
>
|
||||
<AuthProvider session={session || undefined}>
|
||||
<Provider>
|
||||
<NextTopLoader color="#f49d1b" showSpinner={false} zIndex={9999} />
|
||||
<Toaster richColors />
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<QueryProvider>{children}</QueryProvider>
|
||||
</ThemeProvider>
|
||||
</Provider>
|
||||
</AuthProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user