You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

  1. import React from 'react';
  2. import { Switch, Route, withRouter } from 'react-router-dom';
  3. import { showTrends } from 'flavours/glitch/initial_state';
  4. import Trends from 'flavours/glitch/features/getting_started/containers/trends_container';
  5. import AccountNavigation from 'flavours/glitch/features/account/navigation';
  6. const DefaultNavigation = () => (
  7. <>
  8. {showTrends && (
  9. <>
  10. <div className='flex-spacer' />
  11. <Trends />
  12. </>
  13. )}
  14. </>
  15. );
  16. class NavigationPortal extends React.PureComponent {
  17. render () {
  18. return (
  19. <Switch>
  20. <Route path='/@:acct' exact component={AccountNavigation} />
  21. <Route path='/@:acct/tagged/:tagged?' exact component={AccountNavigation} />
  22. <Route path='/@:acct/with_replies' exact component={AccountNavigation} />
  23. <Route path='/@:acct/followers' exact component={AccountNavigation} />
  24. <Route path='/@:acct/following' exact component={AccountNavigation} />
  25. <Route path='/@:acct/media' exact component={AccountNavigation} />
  26. <Route component={DefaultNavigation} />
  27. </Switch>
  28. );
  29. }
  30. }
  31. export default withRouter(NavigationPortal);