Skip to content

Commit

Permalink
fix: navigate back upon saving tmdb links (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
revam authored Nov 17, 2024
1 parent 71436b2 commit c9fcdf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pages/collection/series/TmdbLinking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
}
Expand Down Expand Up @@ -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!');
Expand Down

0 comments on commit c9fcdf9

Please sign in to comment.