From 87076e5e971d41f8fb0d6a33279a95515f788d07 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Tue, 23 Jul 2024 22:48:57 +0200 Subject: [PATCH] fix tab navigation issue --- src/Components/Profile/Templates/TabsForm.tsx | 2 +- src/Components/Profile/Templates/TabsView.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(() => {