From 7287c27b733c58f3b491d83575237fd84ca73830 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Date: Tue, 1 Aug 2023 11:19:06 +0530 Subject: [PATCH] refactor: changed per_page to 30 (#1734) --- apps/app/constants/fetch-keys.ts | 3 +-- apps/app/hooks/use-user-notifications.tsx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/app/constants/fetch-keys.ts b/apps/app/constants/fetch-keys.ts index 729df8a8c..ce6932205 100644 --- a/apps/app/constants/fetch-keys.ts +++ b/apps/app/constants/fetch-keys.ts @@ -285,8 +285,7 @@ export const getPaginatedNotificationKey = ( if (index === 0) return `/api/workspaces/${workspaceSlug}/users/notifications?${objToQueryParams({ ...params, - // TODO: change to '100:0:0' - cursor: "2:0:0", + cursor: "30:0:0", })}`; const cursor = prevData?.next_cursor; diff --git a/apps/app/hooks/use-user-notifications.tsx b/apps/app/hooks/use-user-notifications.tsx index 53e155032..33c2d4e65 100644 --- a/apps/app/hooks/use-user-notifications.tsx +++ b/apps/app/hooks/use-user-notifications.tsx @@ -15,8 +15,7 @@ import { UNREAD_NOTIFICATIONS_COUNT, getPaginatedNotificationKey } from "constan // type import type { NotificationType, NotificationCount } from "types"; -// TODO: change to 100 -const PER_PAGE = 2; +const PER_PAGE = 30; const useUserNotification = () => { const router = useRouter();