refactor: Wrap authenticated routes (#5695)

This commit is contained in:
Bruno Quaresma
2023-01-12 15:52:16 -03:00
committed by GitHub
parent f9f7283e16
commit e6072eff59
5 changed files with 274 additions and 380 deletions
+3 -4
View File
@@ -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>