about summary refs log tree commit diff
path: root/app/javascript/mastodon/containers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-10-07 20:00:35 +0200
committerGitHub <noreply@github.com>2017-10-07 20:00:35 +0200
commitf486ef2666dacbcb6fcd26e371bb5e945369dcfe (patch)
treec6e0dee82c450a62e56cf0ef368f49f2359513f1 /app/javascript/mastodon/containers
parentd2dee6ea431f52ab90c568b21b25169d5129c7a6 (diff)
Redesign public hashtag pages (#5237)
Diffstat (limited to 'app/javascript/mastodon/containers')
-rw-r--r--app/javascript/mastodon/containers/timeline_container.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/javascript/mastodon/containers/timeline_container.js b/app/javascript/mastodon/containers/timeline_container.js
index 6b545ef09..4be037955 100644
--- a/app/javascript/mastodon/containers/timeline_container.js
+++ b/app/javascript/mastodon/containers/timeline_container.js
@@ -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>
     );