forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Upgrade to react-router v5 (mastodon#25047)"
This reverts commit 1b70d7e.
- Loading branch information
Showing
42 changed files
with
363 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { PureComponent } from 'react'; | ||
|
||
import { Switch, Route, withRouter } from 'react-router-dom'; | ||
|
||
import AccountNavigation from 'mastodon/features/account/navigation'; | ||
import Trends from 'mastodon/features/getting_started/containers/trends_container'; | ||
import { showTrends } from 'mastodon/initial_state'; | ||
|
||
const DefaultNavigation = () => ( | ||
showTrends ? ( | ||
<> | ||
<div className='flex-spacer' /> | ||
<Trends /> | ||
</> | ||
) : null | ||
); | ||
|
||
class NavigationPortal extends PureComponent { | ||
|
||
render () { | ||
return ( | ||
<Switch> | ||
<Route path='/@:acct' exact component={AccountNavigation} /> | ||
<Route path='/@:acct/tagged/:tagged?' exact component={AccountNavigation} /> | ||
<Route path='/@:acct/with_replies' exact component={AccountNavigation} /> | ||
<Route path='/@:acct/followers' exact component={AccountNavigation} /> | ||
<Route path='/@:acct/following' exact component={AccountNavigation} /> | ||
<Route path='/@:acct/media' exact component={AccountNavigation} /> | ||
<Route component={DefaultNavigation} /> | ||
</Switch> | ||
); | ||
} | ||
|
||
} | ||
export default withRouter(NavigationPortal); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.