diff options
Diffstat (limited to 'app/javascript/mastodon/containers/timeline_container.js')
-rw-r--r-- | app/javascript/mastodon/containers/timeline_container.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/javascript/mastodon/containers/timeline_container.js b/app/javascript/mastodon/containers/timeline_container.js index ed8095f90..8de2379b7 100644 --- a/app/javascript/mastodon/containers/timeline_container.js +++ b/app/javascript/mastodon/containers/timeline_container.js @@ -7,6 +7,7 @@ import { hydrateStore } from '../actions/store'; import { IntlProvider, addLocaleData } from 'react-intl'; import { getLocale } from '../locales'; import PublicTimeline from '../features/standalone/public_timeline'; +import CommunityTimeline from '../features/standalone/community_timeline'; import HashtagTimeline from '../features/standalone/hashtag_timeline'; import ModalContainer from '../features/ui/containers/modal_container'; import initialState from '../initial_state'; @@ -25,22 +26,24 @@ export default class TimelineContainer extends React.PureComponent { static propTypes = { locale: PropTypes.string.isRequired, hashtag: PropTypes.string, - local: PropTypes.bool, + showPublicTimeline: PropTypes.bool.isRequired, }; static defaultProps = { - local: !initialState.settings.known_fediverse, + showPublicTimeline: initialState.settings.known_fediverse, }; render () { - const { locale, hashtag, local } = this.props; + const { locale, hashtag, showPublicTimeline } = this.props; let timeline; if (hashtag) { timeline = <HashtagTimeline hashtag={hashtag} local={local} />; + } else if (showPublicTimeline) { + timeline = <PublicTimeline />; } else { - timeline = <PublicTimeline local={local} />; + timeline = <CommunityTimeline />; } return ( @@ -48,7 +51,6 @@ export default class TimelineContainer extends React.PureComponent { <Provider store={store}> <Fragment> {timeline} - {ReactDOM.createPortal( <ModalContainer />, document.getElementById('modal-container'), |