From 6e42bc0adb13095ff8e185dca2536b03a48083b3 Mon Sep 17 00:00:00 2001 From: Swapnil Date: Sat, 4 Jan 2025 21:05:49 +0530 Subject: [PATCH] [FIXED] - notification --- src/Pages/Admin/Notification.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Pages/Admin/Notification.jsx b/src/Pages/Admin/Notification.jsx index 19e3d80..23af1eb 100644 --- a/src/Pages/Admin/Notification.jsx +++ b/src/Pages/Admin/Notification.jsx @@ -23,7 +23,7 @@ import ToastBox from "../../Components/ToastBox"; import NormalTable from "../../Components/DataTable/NormalTable"; import GlobalStateContext from "../../Contexts/GlobalStateContext"; import { useGetInvestorsQuery } from "../../Services/investor.details.service"; -import { TABLE_PAGINATION } from "../../Constants/Paginations"; +import { INVESTOR_TABLE_PAGINATION, TABLE_PAGINATION } from "../../Constants/Paginations"; import { formatDate, generateSerialNumber } from "../../Constants/Constants"; import { ViewIcon } from "@chakra-ui/icons"; import { useGetUnbanInvestorQuery } from "../../Services/ban.investor.service"; @@ -66,8 +66,8 @@ const Notification = () => { const [form, setForm] = useState({}); const [isLoading, setIsLoading] = useState(false); const [ selectedRadio, setSelectedRadio] = useState([]) - const [pageSize, setPageSize] = useState(TABLE_PAGINATION?.size); - const [currentPage, setCurrentPage] = useState(TABLE_PAGINATION?.page); + const [pageSize, setPageSize] = useState(INVESTOR_TABLE_PAGINATION?.size); + const [currentPage, setCurrentPage] = useState(INVESTOR_TABLE_PAGINATION?.page); const [searchTerm, setSearchTerm] = useState(""); const [debouncedSearchTerm, setDebouncedSearchTerm] = useState(""); @@ -116,7 +116,7 @@ const Notification = () => { refetch, } = useGetUnbanInvestorQuery({ page: debouncedSearchTerm ? undefined : currentPage, // Omit pagination for search - size: debouncedSearchTerm ? undefined : pageSize, // Omit pagination for search + size: debouncedSearchTerm ? undefined : 10000 || pageSize || 500, // Omit pagination for search search: debouncedSearchTerm, }, {