Files
euchre_camp/src/app/layout.tsx
T
david e3895d30b4 feat: add view-as-role feature for site admins (#15)
Site admins can now temporarily view the site as a player, tournament admin,
or club admin to understand the experience for each role.

Changes:
- Added RoleSwitcher context and provider for client-side role simulation
- Added role switcher dropdown in Navigation (visible only to site admins)
- Added yellow banner showing current viewing-as role with reset button
- Navigation links and wordmark href now use effective role for conditional display
- Added BDD feature file with 5 scenarios covering all role transitions
- Added step definitions for site admin login and role switcher interactions

The view-as feature is purely UI-level - server-side permissions remain unchanged.
5 scenarios, 27 steps, all passing.
2026-05-02 02:37:01 -07:00

37 lines
943 B
TypeScript

import type { Metadata } from "next";
import "./globals.css";
import { SessionProvider } from "@/components/SessionProvider";
import { RoleSwitcherProvider } from "@/components/RoleSwitcher";
import Footer from "@/components/Footer";
const inter = {
variable: "--font-inter",
};
export const metadata: Metadata = {
title: "EuchreCamp - Tournament Management & Partnership Analytics",
description: "Track your Euchre games, tournaments, and partnership performance",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html
lang="en"
className={`${inter.variable} h-full antialiased`}
>
<body className="min-h-full flex flex-col overflow-x-hidden">
<SessionProvider>
<RoleSwitcherProvider>
{children}
<Footer />
</RoleSwitcherProvider>
</SessionProvider>
</body>
</html>
);
}