Browse Source

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

pull/4/head
Eugen Rochko 6 years ago
committed by GitHub
parent
commit
3623aea6c9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/javascript/mastodon/features/ui/index.js

+ 2
- 1
app/javascript/mastodon/features/ui/index.js 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} />

Loading…
Cancel
Save