From 0fb1786f31b57f021f7e2b54bef6d9ef185c9401 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 17 Nov 2024 20:04:22 +0100 Subject: [PATCH] fix: navigate back upon saving tmdb links --- src/pages/collection/series/TmdbLinking.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/collection/series/TmdbLinking.tsx b/src/pages/collection/series/TmdbLinking.tsx index 2ee39eb4..4b0c0f00 100644 --- a/src/pages/collection/series/TmdbLinking.tsx +++ b/src/pages/collection/series/TmdbLinking.tsx @@ -240,6 +240,8 @@ const TmdbLinking = () => { } else { toast.success('Episode links have been updated!'); } + // Note: The tmdb linking page's parent is the collection page, so we need to navigate from the collection page to the series page, even though we use the series id on the tmdb linking page too. + navigate(`../series/${seriesId}`); } catch (error) { toast.error('Failed to save links!'); } @@ -272,6 +274,8 @@ const TmdbLinking = () => { resetQueries(['series', seriesId]); setLinkOverrides({}); toast.success('Links saved!'); + // Note: The tmdb linking page's parent is the collection page, so we need to navigate from the collection page to the series page, even though we use the series id on the tmdb linking page too. + navigate(`../series/${seriesId}`); } catch (error) { console.error(error); toast.error('Failed to save links!');