Updating files after merge

This commit is contained in:
mgabdev
2020-01-29 11:45:17 -05:00
parent 8c9cac2beb
commit 2bd01457a6
48 changed files with 106 additions and 165 deletions

View File

@@ -27,11 +27,11 @@ export default class WrappedRoute extends Component {
<Bundle fetchComponent={component} loading={this.renderLoading} error={this.renderError}>
{Component =>
(
<Page params={match.params} {...componentParams}>
<Component params={match.params} {...componentParams}>
{content}
</Component>
</Page>
<Page params={match.params} {...componentParams}>
<Component params={match.params} {...componentParams}>
{content}
</Component>
</Page>
)
}
</Bundle>
@@ -61,15 +61,15 @@ export default class WrappedRoute extends Component {
return <BundleColumnError {...props} />;
}
render () {
render() {
const { component: Component, content, publicRoute, ...rest } = this.props;
if (!publicRoute && !me) {
const actualUrl = encodeURIComponent(this.props.computedMatch.url);
return <Route path={this.props.path} component={() => {
window.location.href = `/auth/sign_in?redirect_uri=${actualUrl}`;
return null;
}}/>
window.location.href = `/auth/sign_in?redirect_uri=${actualUrl}`;
return null;
}} />
}
return <Route {...rest} render={this.renderComponent} />;