Change featured hashtags to be displayed in navigation panel (#19382)
This commit is contained in:
parent
1b83040bd4
commit
aefa9253d6
9 changed files with 161 additions and 101 deletions
30
app/javascript/mastodon/components/navigation_portal.js
Normal file
30
app/javascript/mastodon/components/navigation_portal.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
import React from 'react';
|
||||
import { Switch, Route, withRouter } from 'react-router-dom';
|
||||
import { showTrends } from 'mastodon/initial_state';
|
||||
import Trends from 'mastodon/features/getting_started/containers/trends_container';
|
||||
import AccountNavigation from 'mastodon/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>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue