From 9a7a7be2de6a14e01d4b6d2619b9610fc7387717 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Wed, 17 Apr 2024 16:33:49 +0530 Subject: [PATCH] Update router.push to router.replace in dashboard page components --- src/ui/app/business/dashboard/page.tsx | 2 +- src/ui/app/influencer/dashboard/page.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/app/business/dashboard/page.tsx b/src/ui/app/business/dashboard/page.tsx index e855ec9e..612bc7d4 100644 --- a/src/ui/app/business/dashboard/page.tsx +++ b/src/ui/app/business/dashboard/page.tsx @@ -1295,7 +1295,7 @@ export default function BusinessDashboardPage() { const tab = searchParams.get("tab"); const _selectedTab = tabs.find((_tab) => _tab.key === tab); if (_selectedTab) setSelectedTab(_selectedTab?.value); - else router.push(tabs[0]?.route!); + else router.replace(tabs[0]?.route!); }, [searchParams]); return ( diff --git a/src/ui/app/influencer/dashboard/page.tsx b/src/ui/app/influencer/dashboard/page.tsx index 3412dbda..1353a047 100644 --- a/src/ui/app/influencer/dashboard/page.tsx +++ b/src/ui/app/influencer/dashboard/page.tsx @@ -1158,7 +1158,7 @@ export default function BusinessDashboardPage() { const tab = searchParams.get("tab"); const _selectedTab = tabs.find((_tab) => _tab.key === tab); if (_selectedTab) setSelectedTab(_selectedTab?.value); - else router.push(tabs[0]?.route!); + else router.replace(tabs[0]?.route!); }, [searchParams]); useEffect(() => {