chore: tweak default page size

This commit is contained in:
Steven
2024-02-29 23:42:06 +08:00
parent 00788bd8f8
commit 12f4d3a10d
7 changed files with 18 additions and 20 deletions

View File

@ -3,7 +3,7 @@ import React, { useState } from "react";
import { toast } from "react-hot-toast";
import useDebounce from "react-use/lib/useDebounce";
import { memoServiceClient } from "@/grpcweb";
import { DEFAULT_MEMO_LIMIT } from "@/helpers/consts";
import { DEFAULT_LIST_MEMOS_PAGE_SIZE } from "@/helpers/consts";
import { getDateTimeString } from "@/helpers/datetime";
import useCurrentUser from "@/hooks/useCurrentUser";
import { Memo } from "@/types/proto/api/v2/memo_service";
@ -35,7 +35,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
filters.push(`content_search == [${JSON.stringify(searchText)}]`);
}
const { memos } = await memoServiceClient.listMemos({
pageSize: DEFAULT_MEMO_LIMIT,
pageSize: DEFAULT_LIST_MEMOS_PAGE_SIZE,
filter: filters.length > 0 ? filters.join(" && ") : undefined,
});
setFetchedMemos(memos);