Added title to NewsPage, NewsLayout
• Added: - title to NewsPage, NewsLayout
This commit is contained in:
parent
2d1fdcf6fb
commit
a614d3c5cd
|
@ -193,8 +193,8 @@ class SwitchingArea extends React.PureComponent {
|
|||
|
||||
<WrappedRoute path='/compose' exact page={BasicPage} component={Compose} content={children} componentParams={{ title: 'Compose', page: 'compose' }} />
|
||||
|
||||
<WrappedRoute path='/news' exact publicRoute page={NewsPage} component={News} content={children} />
|
||||
<WrappedRoute path='/news/view/:trendsRSSId' page={NewsPage} component={NewsView} content={children} />
|
||||
<WrappedRoute path='/news' exact publicRoute page={NewsPage} component={News} content={children} componentParams={{ title: 'News' }} />
|
||||
<WrappedRoute path='/news/view/:trendsRSSId' page={NewsPage} component={NewsView} content={children} componentParams={{ title: 'News RSS Feed' }} />
|
||||
|
||||
<WrappedRoute path='/timeline/all' exact page={CommunityPage} component={CommunityTimeline} content={children} componentParams={{ title: 'Community Feed' }} />
|
||||
<WrappedRoute path='/timeline/pro' exact page={ProPage} component={ProTimeline} content={children} componentParams={{ title: 'Pro Feed' }} />
|
||||
|
|
|
@ -35,7 +35,7 @@ class NewsLayout extends ImmutablePureComponent {
|
|||
noRightSidebar
|
||||
showLinkFooterInSidebar
|
||||
page='news'
|
||||
title='News'
|
||||
title={title}
|
||||
>
|
||||
<div className={[_s.d, _s.flexRow, _s.w100PC].join(' ')}>
|
||||
{children}
|
||||
|
@ -48,6 +48,7 @@ class NewsLayout extends ImmutablePureComponent {
|
|||
|
||||
NewsLayout.propTypes = {
|
||||
children: PropTypes.node,
|
||||
title: PropTypes.string.isRequired,
|
||||
}
|
||||
|
||||
export default NewsLayout
|
|
@ -6,11 +6,11 @@ import NewsLayout from '../layouts/news_layout'
|
|||
class NewsPage extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
const { children } = this.props
|
||||
const { children, title } = this.props
|
||||
|
||||
return (
|
||||
<NewsLayout>
|
||||
<PageTitle path='News' />
|
||||
<NewsLayout title={title}>
|
||||
<PageTitle path={title} />
|
||||
{children}
|
||||
</NewsLayout>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue