adds data access, login flow, navigation menu.
And some more stuff. :)
This commit is contained in:
@@ -4,6 +4,8 @@ import { useState } from "react";
|
||||
import { AuthProvider } from "react-oidc-context";
|
||||
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";
|
||||
|
||||
const sourceSans = Source_Sans_3({
|
||||
weight: ["400"],
|
||||
@@ -14,6 +16,16 @@ const nunito = Nunito({
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
function LayoutContent({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<>
|
||||
<AuthStatus />
|
||||
{children}
|
||||
<NavigationBar />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
@@ -28,7 +40,9 @@ export default function RootLayout({
|
||||
return (
|
||||
<html lang="en" className={nunito.className}>
|
||||
<body className={`bg-game-show ${isAnimate ? "animate" : ""} h-screen`}>
|
||||
<AuthProvider {...oidcConfig}>{children}</AuthProvider>
|
||||
<AuthProvider {...oidcConfig}>
|
||||
<LayoutContent>{children}</LayoutContent>
|
||||
</AuthProvider>
|
||||
<button
|
||||
className={`absolute top-1 left-1 ${isAnimate ? "pause" : "play"}`}
|
||||
onClick={toggleAnimation}
|
||||
|
||||
Reference in New Issue
Block a user