Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: changed per_page to 30 #1734

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/app/constants/fetch-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions apps/app/hooks/use-user-notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down