mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-10 09:29:18 +00:00
Redirect / to home on mobile layout, to getting started on desktop (#7677)
This commit is contained in:
parent
1a7a74ff76
commit
3623aea6c9
|
@ -132,11 +132,12 @@ class SwitchingColumnsArea extends React.PureComponent {
|
||||||
render () {
|
render () {
|
||||||
const { children } = this.props;
|
const { children } = this.props;
|
||||||
const { mobile } = this.state;
|
const { mobile } = this.state;
|
||||||
|
const redirect = mobile ? <Redirect from='/' to='/timelines/home' exact /> : <Redirect from='/' to='/getting-started' exact />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ColumnsAreaContainer ref={this.setRef} singleColumn={mobile}>
|
<ColumnsAreaContainer ref={this.setRef} singleColumn={mobile}>
|
||||||
<WrappedSwitch>
|
<WrappedSwitch>
|
||||||
<Redirect from='/' to='/getting-started' exact />
|
{redirect}
|
||||||
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
|
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
|
||||||
<WrappedRoute path='/keyboard-shortcuts' component={KeyboardShortcuts} content={children} />
|
<WrappedRoute path='/keyboard-shortcuts' component={KeyboardShortcuts} content={children} />
|
||||||
<WrappedRoute path='/timelines/home' component={HomeTimeline} content={children} />
|
<WrappedRoute path='/timelines/home' component={HomeTimeline} content={children} />
|
||||||
|
|
Loading…
Reference in a new issue