about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/util/react_router_helpers.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-03-01 02:48:44 +0100
committerGitHub <noreply@github.com>2018-03-01 02:48:44 +0100
commit51310125051a75ef7af4e8ffc8b6532c151e96b6 (patch)
treee8edf2d2ba432913bcb9ff1f12bd6cfd1f30f489 /app/javascript/mastodon/features/ui/util/react_router_helpers.js
parent473a69ab18c17551c99dc0806aa948b7edaf7cb0 (diff)
Add "Toots/Toots with replies/Media" tab below profile header (#6572)
* Add "Toots/Toots with replies/Media" tab below profile header

* Add focal point display to account gallery timeline

* Fix visual glitch of standalone GIFV
Diffstat (limited to 'app/javascript/mastodon/features/ui/util/react_router_helpers.js')
-rw-r--r--app/javascript/mastodon/features/ui/util/react_router_helpers.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/ui/util/react_router_helpers.js b/app/javascript/mastodon/features/ui/util/react_router_helpers.js
index 43007ddc3..32dfe320b 100644
--- a/app/javascript/mastodon/features/ui/util/react_router_helpers.js
+++ b/app/javascript/mastodon/features/ui/util/react_router_helpers.js
@@ -35,14 +35,19 @@ export class WrappedRoute extends React.Component {
     component: PropTypes.func.isRequired,
     content: PropTypes.node,
     multiColumn: PropTypes.bool,
-  }
+    componentParams: PropTypes.object,
+  };
+
+  static defaultProps = {
+    componentParams: {},
+  };
 
   renderComponent = ({ match }) => {
-    const { component, content, multiColumn } = this.props;
+    const { component, content, multiColumn, componentParams } = this.props;
 
     return (
       <BundleContainer fetchComponent={component} loading={this.renderLoading} error={this.renderError}>
-        {Component => <Component params={match.params} multiColumn={multiColumn}>{content}</Component>}
+        {Component => <Component params={match.params} multiColumn={multiColumn} {...componentParams}>{content}</Component>}
       </BundleContainer>
     );
   }