diff --git a/src/Components/Profile/Templates/TabsForm.tsx b/src/Components/Profile/Templates/TabsForm.tsx index 87275446..6443a96b 100644 --- a/src/Components/Profile/Templates/TabsForm.tsx +++ b/src/Components/Profile/Templates/TabsForm.tsx @@ -20,7 +20,7 @@ export const TabsForm = ({ item, state, setState, updatePermission, linkItem, un let urlTab = params.get("tab"); if (!urlTab?.includes(id.toString())) params.set("tab", `${id ? id : ""}`) - window.history.pushState('', '', "?" + params.toString()); + navigate(location.pathname+ "?" + params.toString()); } useEffect(() => { diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx index a79f7d59..6f8d4c19 100644 --- a/src/Components/Profile/Templates/TabsView.tsx +++ b/src/Components/Profile/Templates/TabsView.tsx @@ -32,7 +32,7 @@ export const TabsView = ({ item, offers, needs, relations, updatePermission, loa let urlTab = params.get("tab"); if (!urlTab?.includes(id.toString())) params.set("tab", `${id ? id : ""}`) - window.history.pushState('', '', "?" + params.toString()); + navigate(location.pathname+ "?" + params.toString()); } useEffect(() => {