nu met de juiste files toegevoegd

This commit is contained in:
2025-08-03 10:50:49 +02:00
parent 54883d34c0
commit c21c98f6c4
6 changed files with 35 additions and 52 deletions
+17 -2
View File
@@ -6,6 +6,7 @@ import { oidcConfig, userManager } from "muzak/config/auth";
import { Source_Sans_3, Nunito } from "next/font/google";
import AuthStatus from "muzak/components/AuthStatus";
import NavigationBar from "muzak/components/NavigationBar";
import Quota from "muzak/components/Quota";
const sourceSans = Source_Sans_3({
weight: ["400"],
@@ -16,12 +17,21 @@ const nunito = Nunito({
subsets: ["latin"],
});
function LayoutContent({ children }: { children: React.ReactNode }) {
function LayoutContent({
children,
quota,
setQuota,
}: {
children: React.ReactNode;
quota: number | null;
setQuota: React.Dispatch<React.SetStateAction<number | null>>;
}) {
return (
<>
<AuthStatus />
{children}
<NavigationBar />
<Quota quota={quota} setQuota={setQuota} />
</>
);
}
@@ -32,6 +42,7 @@ export default function RootLayout({
children: React.ReactNode;
}) {
const [isAnimate, setIsAnimate] = useState(false);
const [quota, setQuota] = useState<number | null>(null);
const toggleAnimation = () => {
setIsAnimate(!isAnimate);
@@ -41,7 +52,11 @@ export default function RootLayout({
<html lang="en" className={nunito.className}>
<body className={`bg-game-show ${isAnimate ? "animate" : ""} h-screen`}>
<AuthProvider {...oidcConfig}>
<LayoutContent>{children}</LayoutContent>
<LayoutContent
children={children}
quota={quota}
setQuota={setQuota}
/>
</AuthProvider>
<button
className={`absolute top-1 left-1 ${isAnimate ? "pause" : "play"}`}