Spaces:
Sleeping
Sleeping
BRIDGE Platform Agent
feat(platform): BRIDGE Modules hub with /modules/e and /modules/s routed workspaces
1955a0f Download src/App.tsx from sitcod3/BRIDGE_Modul-S_prod: direct link, hf CLI and curl.
- Browser
- Download file 4.13 kB
-
https://huggingface.co/spaces/sitcod3/BRIDGE_Modul-S_prod/resolve/main/src/App.tsx
- Command line
-
hf download hf://spaces/sitcod3/BRIDGE_Modul-S_prod/src/App.tsx
-
curl -L -o App.tsx https://huggingface.co/spaces/sitcod3/BRIDGE_Modul-S_prod/resolve/main/src/App.tsx
4.13 kB
| import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom"; | |
| import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | |
| import { Toaster } from "react-hot-toast"; | |
| import { ApiKeyProvider } from "./context/ApiKeyContext"; | |
| import { ThemeProvider } from "./context/ThemeContext"; | |
| import { LaunchProvider } from "./modules/LaunchContext"; | |
| import ModuleShell from "./modules/ModuleShell"; | |
| import ModuleHub from "./modules/ModuleHub"; | |
| import { | |
| EDashboard, ECampaigns, ECampaignDetail, ELeads, EEmailAccounts, EWarmup, | |
| EInbox, EWebhooks, EAnalytics, EClients, EPricing, ESettings, | |
| SDashboard, SCampaigns, SCampaignDetail, SLeads, SEmailAccounts, SWarmup, | |
| SInbox, SWebhooks, SAnalytics, SClients, SSettings, | |
| } from "./modules/lazyPages"; | |
| const queryClient = new QueryClient({ | |
| defaultOptions: { | |
| queries: { | |
| staleTime: 30_000, | |
| retry: 2, | |
| refetchOnWindowFocus: true, | |
| }, | |
| }, | |
| }); | |
| /* Legacy deep links (pre-platform routes) redirect into Module E. */ | |
| const LEGACY_PATHS = [ | |
| "campaigns", | |
| "leads", | |
| "email-accounts", | |
| "warmup", | |
| "inbox", | |
| "webhooks", | |
| "analytics", | |
| "clients", | |
| "pricing", | |
| "settings", | |
| ]; | |
| export default function App() { | |
| return ( | |
| <QueryClientProvider client={queryClient}> | |
| <ThemeProvider> | |
| <ApiKeyProvider> | |
| <BrowserRouter> | |
| <LaunchProvider> | |
| <Routes> | |
| <Route path="/" element={<ModuleHub />} /> | |
| {/* Module E — mint GreenTheme workspace */} | |
| <Route path="/modules/e" element={<ModuleShell module="e" />}> | |
| <Route index element={<EDashboard />} /> | |
| <Route path="campaigns" element={<ECampaigns />} /> | |
| <Route path="campaigns/:id" element={<ECampaignDetail />} /> | |
| <Route path="leads" element={<ELeads />} /> | |
| <Route path="email-accounts" element={<EEmailAccounts />} /> | |
| <Route path="warmup" element={<EWarmup />} /> | |
| <Route path="inbox" element={<EInbox />} /> | |
| <Route path="webhooks" element={<EWebhooks />} /> | |
| <Route path="analytics" element={<EAnalytics />} /> | |
| <Route path="clients" element={<EClients />} /> | |
| <Route path="pricing" element={<EPricing />} /> | |
| <Route path="settings" element={<ESettings />} /> | |
| </Route> | |
| {/* Module S — prod indigo workspace */} | |
| <Route path="/modules/s" element={<ModuleShell module="s" />}> | |
| <Route index element={<SDashboard />} /> | |
| <Route path="campaigns" element={<SCampaigns />} /> | |
| <Route path="campaigns/:id" element={<SCampaignDetail />} /> | |
| <Route path="leads" element={<SLeads />} /> | |
| <Route path="email-accounts" element={<SEmailAccounts />} /> | |
| <Route path="warmup" element={<SWarmup />} /> | |
| <Route path="inbox" element={<SInbox />} /> | |
| <Route path="webhooks" element={<SWebhooks />} /> | |
| <Route path="analytics" element={<SAnalytics />} /> | |
| <Route path="clients" element={<SClients />} /> | |
| <Route path="settings" element={<SSettings />} /> | |
| </Route> | |
| {/* Legacy route compatibility */} | |
| {LEGACY_PATHS.map((p) => ( | |
| <Route | |
| key={p} | |
| path={`/${p}`} | |
| element={<Navigate to={`/modules/e/${p}`} replace />} | |
| /> | |
| ))} | |
| <Route path="*" element={<Navigate to="/" replace />} /> | |
| </Routes> | |
| </LaunchProvider> | |
| </BrowserRouter> | |
| <Toaster | |
| position="bottom-right" | |
| toastOptions={{ | |
| style: { | |
| background: '#18181b', | |
| color: '#fff', | |
| border: '1px solid #27272a' | |
| } | |
| }} | |
| /> | |
| </ApiKeyProvider> | |
| </ThemeProvider> | |
| </QueryClientProvider> | |
| ); | |
| } | |