app,create-app: update to use app.createRoot()

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-12-08 11:43:23 +01:00
parent 62e58de887
commit 0e91c1196d
3 changed files with 39 additions and 16 deletions
+3 -7
View File
@@ -145,8 +145,6 @@ const app = createApp({
},
});
const AppProvider = app.getProvider();
const routes = (
<FlatRoutes>
<Route path="/" element={<Navigate to="catalog" />} />
@@ -277,14 +275,12 @@ const routes = (
</FlatRoutes>
);
const App = () => (
<AppProvider>
export default app.createRoot(
<>
<AlertDisplay transientTimeoutMs={2500} />
<OAuthRequestDialog />
<AppRouter>
<Root>{routes}</Root>
</AppRouter>
</AppProvider>
</>,
);
export default App;