From db280095aec71152544361499c8e99cfeee51683 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Fri, 15 Mar 2024 23:12:11 -0400 Subject: [PATCH] Test this way of routing --- src/components/layout/Navigation.tsx | 2 +- src/pages/TopFlix.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/layout/Navigation.tsx b/src/components/layout/Navigation.tsx index 2d5fca3e..6c8c24a7 100644 --- a/src/components/layout/Navigation.tsx +++ b/src/components/layout/Navigation.tsx @@ -103,7 +103,7 @@ export function Navigation(props: NavigationProps) { diff --git a/src/pages/TopFlix.tsx b/src/pages/TopFlix.tsx index 550aa3bc..2f67badb 100644 --- a/src/pages/TopFlix.tsx +++ b/src/pages/TopFlix.tsx @@ -43,12 +43,16 @@ function isShowOrMovie(tmdbFullId: string): "series" | "movie" | "unknown" { function directLinkToContent(tmdbFullId: string) { if (isShowOrMovie(tmdbFullId) === "series") { - return `${window.location.pathname}#/media/tmdb-movie-${ + return `/media/tmdb-tv-${ + tmdbFullId.split("-")[1] + }#/media/tmdb-tv-${ tmdbFullId.split("-")[1] }`; } if (isShowOrMovie(tmdbFullId) === "movie") { - return `${window.location.pathname}#/media/tmdb-tv-${ + return `/media/tmdb-movie-${ + tmdbFullId.split("-")[1] + }#/media/tmdb-movie-${ tmdbFullId.split("-")[1] }`; }