1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-29 16:07:40 +01:00

Test this way of routing

This commit is contained in:
Cooper Ransom 2024-03-15 23:12:11 -04:00
parent 4ab5ed2915
commit db280095ae
2 changed files with 7 additions and 3 deletions

View file

@ -103,7 +103,7 @@ export function Navigation(props: NavigationProps) {
<IconPatch icon={Icons.GITHUB} clickable downsized /> <IconPatch icon={Icons.GITHUB} clickable downsized />
</a> </a>
<a <a
href={`${window.location.pathname}#flix`} href="/flix#flix"
rel="noreferrer" rel="noreferrer"
className="text-xl text-white tabbable rounded-full" className="text-xl text-white tabbable rounded-full"
> >

View file

@ -43,12 +43,16 @@ function isShowOrMovie(tmdbFullId: string): "series" | "movie" | "unknown" {
function directLinkToContent(tmdbFullId: string) { function directLinkToContent(tmdbFullId: string) {
if (isShowOrMovie(tmdbFullId) === "series") { if (isShowOrMovie(tmdbFullId) === "series") {
return `${window.location.pathname}#/media/tmdb-movie-${ return `/media/tmdb-tv-${
tmdbFullId.split("-")[1]
}#/media/tmdb-tv-${
tmdbFullId.split("-")[1] tmdbFullId.split("-")[1]
}`; }`;
} }
if (isShowOrMovie(tmdbFullId) === "movie") { if (isShowOrMovie(tmdbFullId) === "movie") {
return `${window.location.pathname}#/media/tmdb-tv-${ return `/media/tmdb-movie-${
tmdbFullId.split("-")[1]
}#/media/tmdb-movie-${
tmdbFullId.split("-")[1] tmdbFullId.split("-")[1]
}`; }`;
} }