mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
fix: replace route when going back in streams list or changing season
This commit is contained in:
parent
2776367c2c
commit
fc320e00c0
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue