]> cat aescling's git repositories - mastodon.git/commitdiff
Redirect / to home on mobile layout, to getting started on desktop (#7677)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 30 May 2018 16:42:06 +0000 (18:42 +0200)
committerGitHub <noreply@github.com>
Wed, 30 May 2018 16:42:06 +0000 (18:42 +0200)
app/javascript/mastodon/features/ui/index.js

index adb856b9275a19a1ac78d8c6cf1b8a54fe069257..f1409b9467f9e0c1f0424f536f4356362200a00b 100644 (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} />