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.
36 lines
945 B
TypeScript
36 lines
945 B
TypeScript
import Newsletter from './views/post-analytics/components/Newsletter';
|
|
import Overview from './views/post-analytics/components/Overview';
|
|
import PostAnalytics from './views/post-analytics/PostAnalytics';
|
|
import Posts from './views/posts/Posts';
|
|
import {RouteObject} from '@tryghost/admin-x-framework';
|
|
|
|
export const APP_ROUTE_PREFIX = '/posts-x';
|
|
|
|
export const routes: RouteObject[] = [
|
|
{
|
|
path: '',
|
|
Component: Posts
|
|
},
|
|
{
|
|
path: 'analytics/:postId',
|
|
Component: PostAnalytics,
|
|
children: [
|
|
{
|
|
path: '',
|
|
Component: Overview
|
|
},
|
|
{
|
|
path: 'overview',
|
|
Component: Overview
|
|
},
|
|
{
|
|
path: 'newsletter',
|
|
Component: Newsletter
|
|
},
|
|
{
|
|
path: 'share',
|
|
Component: Overview
|
|
}
|
|
]
|
|
}
|
|
];
|