0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/apps/admin-x-demo/src/MainContent.tsx

15 lines
343 B
TypeScript

import DetailPage from './DetailPage';
import ListPage from './ListPage';
import {useRouting} from '@tryghost/admin-x-framework/routing';
const MainContent = () => {
const {route} = useRouting();
if (route === 'detail') {
return <DetailPage />;
} else {
return <ListPage />;
}
};
export default MainContent;