0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00
ghost/apps/posts/src/routes.ts
Peter Zimon 19d9c3e3e2
Post analytics router update (#22050)
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.
2025-01-23 16:48:29 +01:00

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
}
]
}
];