import { lazy, Suspense } from "react"; import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom"; import { AuthProvider } from "./auth/AuthContext"; import { RequireAdmin } from "./auth/RequireAdmin"; import { RequireAuth } from "./auth/RequireAuth"; import { AppShell } from "./components/layout/AppShell"; import { DataProvider } from "./data/DataContext"; import { I18nProvider } from "./i18n/I18nContext"; import { ThemeProvider } from "./theme/ThemeContext"; const AdminUsersPage = lazy(() => import("./pages/AdminUsersPage").then((m) => ({ default: m.AdminUsersPage }))); const BrandsPage = lazy(() => import("./pages/BrandsPage").then((m) => ({ default: m.BrandsPage }))); const CrewPage = lazy(() => import("./pages/CrewPage").then((m) => ({ default: m.CrewPage }))); const JobDetailPage = lazy(() => import("./pages/JobDetailPage").then((m) => ({ default: m.JobDetailPage }))); const InsightsPage = lazy(() => import("./pages/InsightsPage").then((m) => ({ default: m.InsightsPage }))); const InvitePage = lazy(() => import("./pages/InvitePage").then((m) => ({ default: m.InvitePage }))); const JobsPage = lazy(() => import("./pages/JobsPage").then((m) => ({ default: m.JobsPage }))); const ForgotPasswordPage = lazy(() => import("./pages/ForgotPasswordPage").then((m) => ({ default: m.ForgotPasswordPage }))); const LoginPage = lazy(() => import("./pages/LoginPage").then((m) => ({ default: m.LoginPage }))); const OutboxDetailPage = lazy(() => import("./pages/OutboxDetailPage").then((m) => ({ default: m.OutboxDetailPage }))); const OutboxPage = lazy(() => import("./pages/OutboxPage").then((m) => ({ default: m.OutboxPage }))); const ProfilePage = lazy(() => import("./pages/ProfilePage").then((m) => ({ default: m.ProfilePage }))); const ResetPasswordPage = lazy(() => import("./pages/ResetPasswordPage").then((m) => ({ default: m.ResetPasswordPage }))); const ScoutPage = lazy(() => import("./pages/ScoutPage").then((m) => ({ default: m.ScoutPage }))); const SettingsPage = lazy(() => import("./pages/SettingsPage").then((m) => ({ default: m.SettingsPage }))); const PlanCheckoutPage = lazy(() => import("./pages/PlanCheckoutPage").then((m) => ({ default: m.PlanCheckoutPage }))); const PlansPage = lazy(() => import("./pages/PlansPage").then((m) => ({ default: m.PlansPage }))); const UsagePage = lazy(() => import("./pages/UsagePage").then((m) => ({ default: m.UsagePage }))); const StudioPage = lazy(() => import("./pages/StudioPage").then((m) => ({ default: m.StudioPage }))); const VerifyEmailPage = lazy(() => import("./pages/VerifyEmailPage").then((m) => ({ default: m.VerifyEmailPage }))); const WizardPage = lazy(() => import("./pages/studio/WizardPage").then((m) => ({ default: m.WizardPage }))); const TodayPage = lazy(() => import("./pages/TodayPage").then((m) => ({ default: m.TodayPage }))); export default function App() { return ( }> } /> } /> } /> } /> } > } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> ); }