Rollback to 9d67724e
This commit is contained in:
@@ -5,12 +5,31 @@ import { Route, Switch } from "wouter";
|
||||
import ErrorBoundary from "./components/ErrorBoundary";
|
||||
import { ThemeProvider } from "./contexts/ThemeContext";
|
||||
import Home from "./pages/Home";
|
||||
import AdminRapportPublicCible from "./pages/AdminRapportPublicCible";
|
||||
import Admin from "./pages/Admin";
|
||||
import AdminFormations from "./pages/AdminFormations";
|
||||
import AdminSequences from "./pages/AdminSequences";
|
||||
import AdminApprenants from "./pages/AdminApprenants";
|
||||
import AdminSequenceInscrits from "./pages/AdminSequenceInscrits";
|
||||
import AdminUsers from "./pages/AdminUsers";
|
||||
import AdminEmailTemplates from "./pages/AdminEmailTemplates";
|
||||
import AdminEmailConfig from "./pages/AdminEmailConfig";
|
||||
import Inscription from "./pages/Inscription";
|
||||
|
||||
function Router() {
|
||||
// make sure to consider if you need authentication for certain routes
|
||||
return (
|
||||
<Switch>
|
||||
<Route path={"/"} component={Home} />
|
||||
<Route path={"/admin/rapport-public-cible"} component={AdminRapportPublicCible} />
|
||||
<Route path={"/inscription/:lien"} component={Inscription} />
|
||||
<Route path={"/admin"} component={Admin} />
|
||||
<Route path={"/admin/formations"} component={AdminFormations} />
|
||||
<Route path={"/admin/sequences"} component={AdminSequences} />
|
||||
<Route path={"/admin/apprenants"} component={AdminApprenants} />
|
||||
<Route path={"/admin/sequences/:id/inscrits"} component={AdminSequenceInscrits} />
|
||||
<Route path={"/admin/users"} component={AdminUsers} />
|
||||
<Route path={"/admin/email-templates"} component={AdminEmailTemplates} />
|
||||
<Route path={"/admin/email-config"} component={AdminEmailConfig} />
|
||||
<Route path={"/404"} component={NotFound} />
|
||||
{/* Final fallback route */}
|
||||
<Route component={NotFound} />
|
||||
@@ -18,18 +37,10 @@ function Router() {
|
||||
);
|
||||
}
|
||||
|
||||
// NOTE: About Theme
|
||||
// - First choose a default theme according to your design style (dark or light bg), than change color palette in index.css
|
||||
// to keep consistent foreground/background color across components
|
||||
// - If you want to make theme switchable, pass `switchable` ThemeProvider and use `useTheme` hook
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<ThemeProvider
|
||||
defaultTheme="light"
|
||||
// switchable
|
||||
>
|
||||
<ThemeProvider defaultTheme="light">
|
||||
<TooltipProvider>
|
||||
<Toaster />
|
||||
<Router />
|
||||
|
||||
Reference in New Issue
Block a user