fix: replace route when going back in streams list or changing season

This commit is contained in:
Botzy 2025-07-21 18:00:42 +03:00
parent 2776367c2c
commit fc320e00c0
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ const StreamsList = ({ className, video, type, onEpisodeSearch, ...props }) => {
typeof video.season === 'number'
? `?${new URLSearchParams({ 'season': video.season })}`
: ''}`;
navigate(navigateTo.replace('#', ''));
navigate(navigateTo.replace('#', ''), { replace: true });
} else {
navigate(-1);
}

View file

@ -14,7 +14,7 @@ const useSeason = (urlParams) => {
const setSeason = React.useCallback((season) => {
const nextQueryParams = new URLSearchParams(queryParams);
nextQueryParams.set('season', season);
setQueryParams(nextQueryParams);
setQueryParams(nextQueryParams, { replace: true });
}, [urlParams, queryParams]);
return [season, setSeason];
};