Vulcan/packages/telescope-posts/lib/routes.jsx
2016-02-16 15:08:30 +09:00

26 lines
No EOL
1 KiB
JavaScript

FlowRouter.route('/', {
name: 'postList',
action: function (params, queryParams) {
const PostListContainer = Telescope.getComponent('PostListContainer');
ReactLayout.render(AppContainer, {content: <PostListContainer terms={queryParams} component="PostList"/>})
// mount(App, {content: <PostListContainer {...queryParams}/>});
}
});
FlowRouter.route('/post/:_id', {
name: 'postPage',
action: function (params, queryParams) {
const PostContainer = Telescope.getComponent('PostContainer');
ReactLayout.render(AppContainer, {content: <PostContainer {...params} component="Post"/>})
// mount(App, {content: <PostListContainer {...queryParams}/>});
}
});
FlowRouter.route('/post/:_id/edit', {
name: 'postEdit',
action: function (params, queryParams) {
const PostContainer = Telescope.getComponent('PostContainer');
ReactLayout.render(AppContainer, {content: <PostContainer {...params} component="PostEdit"/>})
// mount(App, {content: <PostListContainer {...queryParams}/>});
}
});