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"; import { DataDeletionPage } from "./pages/DataDeletionPage"; import { HomePage } from "./pages/HomePage"; import { LoginPage } from "./pages/LoginPage"; import { PrivacyPage } from "./pages/PrivacyPage"; import { TermsPage } from "./pages/TermsPage"; const AdminUsersPage = lazy(() => import("./pages/AdminUsersPage").then((m) => ({ default: m.AdminUsersPage }))); const BrandsPage = lazy(() => import("./pages/BrandsPage").then((m) => ({ default: m.BrandsPage }))); const PolicyPage = lazy(() => import("./pages/PolicyPage").then((m) => ({ default: m.PolicyPage }))); 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 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 RadarWatchesPage = lazy(() => import("./pages/RadarWatchesPage").then((m) => ({ default: m.RadarWatchesPage }))); const RadarOpportunitiesPage = lazy(() => import("./pages/RadarOpportunitiesPage").then((m) => ({ default: m.RadarOpportunitiesPage }))); const CrmStatsPage = lazy(() => import("./pages/CrmStatsPage").then((m) => ({ default: m.CrmStatsPage }))); const CrmBoardPage = lazy(() => import("./pages/CrmBoardPage").then((m) => ({ default: m.CrmBoardPage }))); const CrmFollowUpsPage = lazy(() => import("./pages/CrmFollowUpsPage").then((m) => ({ default: m.CrmFollowUpsPage })), ); 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 }))); const PlaybooksPage = lazy(() => import("./pages/PlaybooksPage").then((m) => ({ default: m.PlaybooksPage }))); const BenchmarkPage = lazy(() => import("./pages/BenchmarkPage").then((m) => ({ default: m.BenchmarkPage }))); const UtmLinksPage = lazy(() => import("./pages/UtmLinksPage").then((m) => ({ default: m.UtmLinksPage }))); const StyleQuizPage = lazy(() => import("./pages/tools/StyleQuizPage").then((m) => ({ default: m.StyleQuizPage })), ); const PainKeywordsPage = lazy(() => import("./pages/tools/PainKeywordsPage").then((m) => ({ default: m.PainKeywordsPage })), ); export default function App() { return ( }> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } > } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> ); }