diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 792f3bd8..b6c432b0 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -5,7 +5,7 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools' import { QueryClientProvider } from '@tanstack/react-query' import { useTranslation } from 'react-i18next' import { useLang } from 'hoofd' -import { Switch, Route } from 'wouter' +import { Switch, Route, useLocation } from 'wouter' import { I18nProvider } from 'react-aria-components' import { Layout } from './layout/Layout' import { NotFoundScreen } from './components/NotFoundScreen' @@ -15,39 +15,47 @@ import { queryClient } from '@/api/queryClient' import { AppInitialization } from '@/components/AppInitialization' import { SdkCreateButton } from './features/sdk/routes/CreateButton' +const SDK_BASE_ROUTE = '/sdk' + function App() { const { i18n } = useTranslation() useLang(i18n.language) + + const [location] = useLocation() + const isSDKRoute = location.startsWith(SDK_BASE_ROUTE) + + if (isSDKRoute) { + return ( + + + + + + + + + + + + + + ) + } + return ( + - - - - - - - {/* We only want support and ReactQueryDevTools in non /sdk routes */} - - - - {Object.entries(routes).map(([, route], i) => ( - - ))} - - - - - - + + + {Object.entries(routes).map(([, route], i) => ( + + ))} + + + +