forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to react-router v5 (mastodon#25047)
Co-authored-by: Claire <[email protected]>
- Loading branch information
1 parent
126cd77
commit 1b70d7e
Showing
42 changed files
with
421 additions
and
363 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Switch, Route } 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: React.FC = () => | ||
showTrends ? ( | ||
<> | ||
<div className='flex-spacer' /> | ||
<Trends /> | ||
</> | ||
) : null; | ||
|
||
export const NavigationPortal: React.FC = () => ( | ||
<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> | ||
); |
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.