mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Test this way of routing
This commit is contained in:
parent
4ab5ed2915
commit
db280095ae
2 changed files with 7 additions and 3 deletions
|
@ -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"
|
||||||
>
|
>
|
||||||
|
|
|
@ -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]
|
||||||
}`;
|
}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue