diff --git a/kraken-app/kraken-app-portal/src/hooks/product/index.ts b/kraken-app/kraken-app-portal/src/hooks/product/index.ts index 088145e1..946b71c3 100644 --- a/kraken-app/kraken-app-portal/src/hooks/product/index.ts +++ b/kraken-app/kraken-app-portal/src/hooks/product/index.ts @@ -575,6 +575,7 @@ export const useGetBuyerList = ( queryFn: () => getBuyerList(productId, params), enabled: Boolean(productId) && Boolean(params.envId), select: (data) => data?.data, + staleTime: STALE_TIME, }); }; diff --git a/kraken-app/kraken-app-portal/src/pages/Buyer/index.tsx b/kraken-app/kraken-app-portal/src/pages/Buyer/index.tsx index 64093431..4f361df5 100644 --- a/kraken-app/kraken-app-portal/src/pages/Buyer/index.tsx +++ b/kraken-app/kraken-app-portal/src/pages/Buyer/index.tsx @@ -13,7 +13,7 @@ import { useAppStore } from "@/stores/app.store"; import { useBuyerStore } from "@/stores/buyer.store"; import { IBuyer } from "@/utils/types/component.type"; import { Button, Flex, Popconfirm, Table, notification } from "antd"; -import { get, isEmpty, omitBy } from "lodash"; +import { get } from "lodash"; import { useEffect, useMemo, useRef } from "react"; import { useBoolean } from "usehooks-ts"; import { ContentTime } from "../NewAPIMapping/components/DeployHistory/ContentTime"; @@ -26,7 +26,7 @@ const Buyer = () => { const { params, setParams, resetParams } = useBuyerStore(); const { data: dataList, isLoading } = useGetBuyerList( currentProduct, - omitBy(params, isEmpty) + params ); const { value: isModalVisible, @@ -180,18 +180,15 @@ const Buyer = () => {