Fix history back on taxes (#3286)
This commit is contained in:
parent
322cf70499
commit
8d5331fd2f
1 changed files with 2 additions and 2 deletions
|
@ -36,10 +36,10 @@ export function useTaxUrlRedirect({
|
|||
if (id === "undefined" && data?.length) {
|
||||
const defaultTaxEntity = data[0];
|
||||
if ("id" in defaultTaxEntity) {
|
||||
navigate(urlFunction(defaultTaxEntity.id));
|
||||
navigate(urlFunction(defaultTaxEntity.id), { replace: true });
|
||||
}
|
||||
if ("country" in defaultTaxEntity) {
|
||||
navigate(urlFunction(defaultTaxEntity.country.code));
|
||||
navigate(urlFunction(defaultTaxEntity.country.code), { replace: true });
|
||||
}
|
||||
}
|
||||
}, [id, data]);
|
||||
|
|
Loading…
Reference in a new issue