Redesign public hashtag pages (#5237)
This commit is contained in:
parent
d2dee6ea43
commit
f486ef2666
12 changed files with 253 additions and 62 deletions
|
@ -6,6 +6,7 @@ import { hydrateStore } from '../actions/store';
|
|||
import { IntlProvider, addLocaleData } from 'react-intl';
|
||||
import { getLocale } from '../locales';
|
||||
import PublicTimeline from '../features/standalone/public_timeline';
|
||||
import HashtagTimeline from '../features/standalone/hashtag_timeline';
|
||||
|
||||
const { localeData, messages } = getLocale();
|
||||
addLocaleData(localeData);
|
||||
|
@ -22,15 +23,24 @@ export default class TimelineContainer extends React.PureComponent {
|
|||
|
||||
static propTypes = {
|
||||
locale: PropTypes.string.isRequired,
|
||||
hashtag: PropTypes.string,
|
||||
};
|
||||
|
||||
render () {
|
||||
const { locale } = this.props;
|
||||
const { locale, hashtag } = this.props;
|
||||
|
||||
let timeline;
|
||||
|
||||
if (hashtag) {
|
||||
timeline = <HashtagTimeline hashtag={hashtag} />;
|
||||
} else {
|
||||
timeline = <PublicTimeline />;
|
||||
}
|
||||
|
||||
return (
|
||||
<IntlProvider locale={locale} messages={messages}>
|
||||
<Provider store={store}>
|
||||
<PublicTimeline />
|
||||
{timeline}
|
||||
</Provider>
|
||||
</IntlProvider>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue