-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move router to top level, functional sidebar
- Loading branch information
Showing
10 changed files
with
304 additions
and
217 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
packages/react/src/components/channel/NavigateToMusicdex.tsx
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,17 @@ | ||
import { Navigate, useParams } from "react-router-dom"; | ||
|
||
export function NavigateToMusicdex() { | ||
const { id } = useParams(); | ||
const isStaging = location.origin.includes("staging"); | ||
|
||
return ( | ||
<Navigate | ||
to={ | ||
isStaging | ||
? `https://music-staging.holodex.net/channel/${id}` | ||
: `https://music.holodex.net/channel/${id}` | ||
} | ||
replace | ||
/> | ||
); | ||
} |
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,12 @@ | ||
import { Outlet } from "react-router-dom"; | ||
|
||
|
||
export default function About () { | ||
|
||
return ( | ||
<div> | ||
About | ||
<Outlet /> | ||
</div> | ||
) | ||
} |
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,12 @@ | ||
import { Outlet } from "react-router-dom"; | ||
|
||
|
||
export default function Channel () { | ||
|
||
return ( | ||
<div> | ||
Channel | ||
<Outlet /> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.