[Glitch] Add "Toots/Toots with replies/Media" tab below profile header

Port 5131012505 to glitch
This commit is contained in:
Thibaut Girka
2018-03-16 19:54:00 +01:00
parent d75a6054a0
commit f00af46d70
10 changed files with 104 additions and 57 deletions

View File

@ -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>
);
}