From 679ee4c6d9373ebf65b40792fbf1b89f69c02b57 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Fri, 27 Dec 2024 12:14:58 +0200 Subject: [PATCH] fix(dashboard): activity feed pagination --- apps/dashboard/src/hooks/use-activity-url-state.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/dashboard/src/hooks/use-activity-url-state.ts b/apps/dashboard/src/hooks/use-activity-url-state.ts index 185b3e5b34d..82971c71f73 100644 --- a/apps/dashboard/src/hooks/use-activity-url-state.ts +++ b/apps/dashboard/src/hooks/use-activity-url-state.ts @@ -91,6 +91,10 @@ export function useActivityUrlState(): ActivityUrlState & { newParams.set('dateRange', data.dateRange); } + if (searchParams.get('page')) { + newParams.set('page', searchParams.get('page') || '0'); + } + setSearchParams(newParams, { replace: true }); }, [activityItemId, setSearchParams]