diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-10-19 11:30:59 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-10-28 19:24:02 +0200 |
commit | 7bb1b917b27760609b08c8c690c87a69ea321ce3 (patch) | |
tree | 2c9e1585cf07d99e4ef82472a51fc33e22f56d25 /app/javascript/flavours/glitch/components/navigation_portal.js | |
parent | 2cea6e55646bf47feb96c43d5461fc36f7a828f4 (diff) |
[Glitch] Change featured hashtags to be displayed in navigation panel
Port aefa9253d61def572396c18a8d2ac3cc706ffa2e to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/components/navigation_portal.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/navigation_portal.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/components/navigation_portal.js b/app/javascript/flavours/glitch/components/navigation_portal.js new file mode 100644 index 000000000..16a8ca3f5 --- /dev/null +++ b/app/javascript/flavours/glitch/components/navigation_portal.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { Switch, Route, withRouter } from 'react-router-dom'; +import { showTrends } from 'flavours/glitch/initial_state'; +import Trends from 'flavours/glitch/features/getting_started/containers/trends_container'; +import AccountNavigation from 'flavours/glitch/features/account/navigation'; + +const DefaultNavigation = () => ( + <> + {showTrends && ( + <> + <div className='flex-spacer' /> + <Trends /> + </> + )} + </> +); + +export default @withRouter +class NavigationPortal extends React.PureComponent { + + render () { + return ( + <Switch> + <Route path='/@:acct/(tagged/:tagged?)?' component={AccountNavigation} /> + <Route component={DefaultNavigation} /> + </Switch> + ); + } + +} |