mirror of
https://github.com/flarum/core.git
synced 2025-08-11 10:55:47 +02:00
infrastructure: provide component classes instead of instances to routes.js
This commit is contained in:
committed by
Franz Liedke
parent
2b39bd7a0d
commit
29065e1ee9
@@ -12,18 +12,18 @@ import NotificationsPage from './components/NotificationsPage';
|
|||||||
*/
|
*/
|
||||||
export default function (app) {
|
export default function (app) {
|
||||||
app.routes = {
|
app.routes = {
|
||||||
index: { path: '/all', component: IndexPage.component() },
|
index: { path: '/all', component: IndexPage },
|
||||||
'index.filter': { path: '/:filter', component: IndexPage.component() },
|
'index.filter': { path: '/:filter', component: IndexPage },
|
||||||
|
|
||||||
discussion: { path: '/d/:id', component: DiscussionPage.component() },
|
discussion: { path: '/d/:id', component: DiscussionPage },
|
||||||
'discussion.near': { path: '/d/:id/:near', component: DiscussionPage.component() },
|
'discussion.near': { path: '/d/:id/:near', component: DiscussionPage },
|
||||||
|
|
||||||
user: { path: '/u/:username', component: PostsUserPage.component() },
|
user: { path: '/u/:username', component: PostsUserPage },
|
||||||
'user.posts': { path: '/u/:username', component: PostsUserPage.component() },
|
'user.posts': { path: '/u/:username', component: PostsUserPage },
|
||||||
'user.discussions': { path: '/u/:username/discussions', component: DiscussionsUserPage.component() },
|
'user.discussions': { path: '/u/:username/discussions', component: DiscussionsUserPage },
|
||||||
|
|
||||||
settings: { path: '/settings', component: SettingsPage.component() },
|
settings: { path: '/settings', component: SettingsPage },
|
||||||
notifications: { path: '/notifications', component: NotificationsPage.component() },
|
notifications: { path: '/notifications', component: NotificationsPage },
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user