mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
ref https://linear.app/ghost/issue/DES-1082/router-prototype This task is about testing, figuring out pros and cons of React Router compared to our current (custom) router, and what effort and risks are involved in migrating to it.
22 lines
739 B
TypeScript
22 lines
739 B
TypeScript
import {APP_ROUTE_PREFIX, routes} from './routes';
|
|
import {FrameworkProvider, RouterProvider, TopLevelFrameworkProps} from '@tryghost/admin-x-framework';
|
|
import {ShadeApp, ShadeAppProps, SidebarProvider} from '@tryghost/shade';
|
|
|
|
interface AppProps {
|
|
framework: TopLevelFrameworkProps;
|
|
designSystem: ShadeAppProps;
|
|
}
|
|
|
|
const App: React.FC<AppProps> = ({framework, designSystem}) => {
|
|
return (
|
|
<FrameworkProvider {...framework}>
|
|
<ShadeApp className='posts' {...designSystem}>
|
|
<SidebarProvider>
|
|
<RouterProvider prefix={APP_ROUTE_PREFIX} routes={routes} />
|
|
</SidebarProvider>
|
|
</ShadeApp>
|
|
</FrameworkProvider>
|
|
);
|
|
};
|
|
|
|
export default App;
|