All files / src/pages/GiveTransfers GiveTransfers.tsx

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52                1x                           24x       24x                                                  
import { PortalRootContainerV2 } from "components/Layout/LayoutV2";
import { PaginationMethodType } from "@components/VirtualList/api";
import { useListTransfersTransactions } from "@features/GiveTransfers/hooks/useListTransfersTransactions";
 
import { TRANSACTIONS_TABLE_TYPES } from "@constants/constants";
import { TRANSFERS_QUERY_KEY } from "@components/Tranfers/hooks/useTransfersTable";
import GiveTransfersTable from "@features/GiveTransfers/GiveTransfersTable";
 
const PAGINATION_METHOD: PaginationMethodType = "cursor";
function GiveTransfers() {
  const {
    hasFilters,
    handleResetFilters,
    isLoading,
    allRows,
    page,
    setPage,
    setPageDispatcher,
    isFetching,
    totalRows,
    nextCursor,
    isFetchingNextPage,
  } = useListTransfersTransactions({
    paginationMethod: PAGINATION_METHOD,
  });
 
  return (
    <PortalRootContainerV2 data-testid="transfers-page">
      <GiveTransfersTable
        type={TRANSACTIONS_TABLE_TYPES.TRANSFERS}
        allRows={allRows}
        isLoading={isLoading}
        isFetching={isFetching}
        isFetchingNextPage={isFetchingNextPage}
        totalRows={totalRows}
        hasFilters={hasFilters}
        handleResetFilters={handleResetFilters}
        page={page}
        setPageDispatcher={setPageDispatcher}
        setPage={setPage}
        queryKey={TRANSFERS_QUERY_KEY}
        paginationMethod={PAGINATION_METHOD}
        enabledInfiniteScroll
        nextCursor={nextCursor}
        emptyStateIconContainerSx={{ width: "68px", height: "68px" }}
      />
    </PortalRootContainerV2>
  );
}
 
export default GiveTransfers;