32 lines
846 B
TypeScript
32 lines
846 B
TypeScript
// app/layout.tsx
|
|
import type { Metadata } from "next";
|
|
import ThemeRegistry from "@/config/ThemeRegistry";
|
|
import ReduxProvider from "./ReduxProvider"; // moved into app/
|
|
import { AuthBootstrap } from "./AuthBootstrap"; // moved into app/
|
|
import { Toaster } from "react-hot-toast";
|
|
import "../styles/globals.scss";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Your App",
|
|
description: "Generated by Next.js",
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<html lang="en">
|
|
<body>
|
|
<ReduxProvider>
|
|
{/* Bootstraps session validation + redirect if invalid */}
|
|
<AuthBootstrap />
|
|
<ThemeRegistry>{children}</ThemeRegistry>
|
|
<Toaster position="top-right" reverseOrder={false} />
|
|
</ReduxProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|