mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: Wrap authenticated routes (#5695)
This commit is contained in:
@@ -64,10 +64,9 @@ export function renderWithAuth(
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<ThemeProvider theme={dark}>
|
||||
<Routes>
|
||||
<Route
|
||||
path={path ?? route}
|
||||
element={<RequireAuth>{ui}</RequireAuth>}
|
||||
/>
|
||||
<Route element={<RequireAuth />}>
|
||||
<Route path={path ?? route} element={ui} />
|
||||
</Route>
|
||||
{routes}
|
||||
</Routes>
|
||||
</ThemeProvider>
|
||||
|
||||
Reference in New Issue
Block a user