import { Navigate, NavLink, Route, Routes } from "react-router-dom"; import { useAuth } from "./auth/AuthContext"; import SalesDashboard from "./pages/aw/SalesDashboard"; import RepScores from "./pages/aw/RepScores"; import ProductDemand from "./pages/aw/ProductDemand"; import AnomalyDetection from "./pages/aw/AnomalyDetection"; import StockDashboard from "./pages/wwi/StockDashboard"; import SupplierScores from "./pages/wwi/SupplierScores"; import WhatIf from "./pages/wwi/WhatIf"; import BusinessEvents from "./pages/wwi/BusinessEvents"; import OperationsPage from "./pages/ops/OperationsPage"; import AuditPage from "./pages/ops/AuditPage"; import ExportsPage from "./pages/ops/ExportsPage"; function NavItem({ to, label }: { to: string; label: string }) { return ( `nav-link${isActive ? " nav-active" : ""}`} > {label} ); } function CenteredShell({ children }: { children: React.ReactNode }) { return (
{children}
); } export default function App() { const auth = useAuth(); if (auth.loading) { return Initializing OIDC session…; } if (auth.error) { return Authentication error: {auth.error}; } if (auth.enabled && !auth.authenticated) { return (

Authentication required.

); } return (
{/* Sidebar */} {/* Main content */}
} /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } />
); }