packages/core-api: split AppComponent into AppRouter and AppRoutes

This commit is contained in:
Patrik Oldsberg
2020-06-16 00:46:39 +02:00
parent b943eb065e
commit 9a37995151
6 changed files with 76 additions and 42 deletions
@@ -89,12 +89,15 @@ export function wrapInTestApp(
}
const AppProvider = app.getProvider();
const AppRouter = app.getRouter();
return (
<AppProvider>
{/* The path of * here is needed to be set as a catch all, so it will render the wrapper element
* and work with nested routes if they exist too */}
<Route path="*" element={<Wrapper />} />
<AppRouter>
{/* The path of * here is needed to be set as a catch all, so it will render the wrapper element
* and work with nested routes if they exist too */}
<Route path="*" element={<Wrapper />} />
</AppRouter>
</AppProvider>
);
}