correctly replace url

This commit is contained in:
Timothy Z. 2026-05-22 23:34:30 +03:00
parent 2cfdf95934
commit 49f8e5eaad
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ const HorizontalNavBar = React.memo(({ className, route, query, title, backButto
const navigate = useNavigate();
const backButtonOnClick = React.useCallback(() => {
if (originPath) {
navigate(originPath);
navigate(originPath, { replace: true });
} else {
navigate(-1);
}

View file

@ -16,7 +16,7 @@ const useAddonDetailsTransportUrl = (urlParams) => {
nextQueryParams.delete('addon');
}
setQueryParams(nextQueryParams);
setQueryParams(nextQueryParams, { replace: true });
}, [urlParams, queryParams]);
return [transportUrl, setTransportUrl];
};