From cb569c99fdeb1bef6fb53e90346819b2ac1be97a Mon Sep 17 00:00:00 2001 From: johnnyjoy Date: Sat, 7 Dec 2024 12:26:21 +0800 Subject: [PATCH] chore: remove useCallback in fetching memo list --- web/src/components/PagedMemoList/PagedMemoList.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/PagedMemoList/PagedMemoList.tsx b/web/src/components/PagedMemoList/PagedMemoList.tsx index 110f34d330899..43e4e7a470cb2 100644 --- a/web/src/components/PagedMemoList/PagedMemoList.tsx +++ b/web/src/components/PagedMemoList/PagedMemoList.tsx @@ -1,6 +1,6 @@ import { Button } from "@usememos/mui"; import { ArrowDownIcon, LoaderIcon } from "lucide-react"; -import { useCallback, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import PullToRefresh from "react-simple-pull-to-refresh"; import { DEFAULT_LIST_MEMOS_PAGE_SIZE } from "@/helpers/consts"; import useResponsiveWidth from "@/hooks/useResponsiveWidth"; @@ -45,11 +45,11 @@ const PagedMemoList = (props: Props) => { })); }; - const refreshList = useCallback(async () => { + const refreshList = async () => { memoList.reset(); setState((state) => ({ ...state, nextPageToken: "" })); fetchMoreMemos(""); - }, [props.filter, props.pageSize]); + }; useEffect(() => { refreshList();