Skip to content

Commit

Permalink
Update router.push to router.replace in dashboard page components
Browse files Browse the repository at this point in the history
  • Loading branch information
muditmahajan committed Apr 17, 2024
1 parent 27cc0a6 commit 9a7a7be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ui/app/business/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/ui/app/influencer/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 9a7a7be

Please sign in to comment.