plane/god-mode/app/layout.tsx

54 lines
1.5 KiB
TypeScript
Raw Normal View History

2024-02-15 06:51:19 +00:00
// lib
2024-01-31 08:33:52 +00:00
import { ThemeProvider } from "lib/theme-provider";
2024-02-15 06:51:19 +00:00
import { ToastContextProvider } from "lib/toast-provider";
2024-01-31 08:33:52 +00:00
// components
import { InstanceSidebar } from "./sidebar";
import { InstanceHeader } from "./header";
2024-02-15 06:51:19 +00:00
// styles
import "./globals.css";
2024-01-31 08:33:52 +00:00
export const metadata = {
title: "God Mode",
description: "You are god now.",
};
interface RootLayoutProps {
children: React.ReactNode;
}
2024-02-15 06:51:19 +00:00
export const RootLayout = async ({ children }: RootLayoutProps) => {
const isUserInstanceAdmin = true;
2024-01-31 08:33:52 +00:00
return (
<html lang="en">
<body className={`antialiased`}>
{/* <AuthWrapper> */}
2024-02-15 06:51:19 +00:00
{/* {isUserInstanceAdmin || true ? ( */}
<ThemeProvider
themes={["light", "dark"]}
defaultTheme="system"
enableSystem
>
<ToastContextProvider>
2024-01-31 08:33:52 +00:00
<div className="relative flex h-screen w-full overflow-hidden">
<InstanceSidebar />
<main className="relative flex h-full w-full flex-col overflow-hidden bg-custom-background-100">
<InstanceHeader />
<div className="h-full w-full overflow-hidden px-10 py-12">
<div className="relative h-full w-full overflow-x-hidden overflow-y-scroll">
{children}
</div>
</div>
</main>
</div>
2024-02-15 06:51:19 +00:00
</ToastContextProvider>
</ThemeProvider>
{/* ) : (
2024-01-31 08:33:52 +00:00
<div>Login</div>
2024-02-02 12:08:31 +00:00
)} */}
2024-01-31 08:33:52 +00:00
</body>
</html>
);
2024-02-15 06:51:19 +00:00
};
export default RootLayout;