1
0
Fork 1
forked from fedi/mastodon

Redirect / to home on mobile layout, to getting started on desktop (#7677)

This commit is contained in:
Eugen Rochko 2018-05-30 18:42:06 +02:00 committed by GitHub
parent 1a7a74ff76
commit 3623aea6c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,11 +132,12 @@ class SwitchingColumnsArea extends React.PureComponent {
render () {
const { children } = this.props;
const { mobile } = this.state;
const redirect = mobile ? <Redirect from='/' to='/timelines/home' exact /> : <Redirect from='/' to='/getting-started' exact />;
return (
<ColumnsAreaContainer ref={this.setRef} singleColumn={mobile}>
<WrappedSwitch>
<Redirect from='/' to='/getting-started' exact />
{redirect}
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
<WrappedRoute path='/keyboard-shortcuts' component={KeyboardShortcuts} content={children} />
<WrappedRoute path='/timelines/home' component={HomeTimeline} content={children} />