mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* add prefix to API resources * fix pw tests * refactor config * remove unnecessary prefixes in resource names * fixes * update screenshots
57 lines
1.5 KiB
TypeScript
57 lines
1.5 KiB
TypeScript
import React from 'react';
|
|
|
|
import type { TxsSocketType } from './socket/types';
|
|
import type { AddressFromToFilter } from 'types/api/address';
|
|
|
|
import type { QueryWithPagesResult } from 'ui/shared/pagination/useQueryWithPages';
|
|
|
|
import TxsContent from './TxsContent';
|
|
import useTxsSort from './useTxsSort';
|
|
|
|
type Props = {
|
|
query: QueryWithPagesResult<'general:txs_validated' | 'general:txs_pending'> |
|
|
QueryWithPagesResult<'general:txs_watchlist'> |
|
|
QueryWithPagesResult<'general:block_txs'> |
|
|
QueryWithPagesResult<'general:zkevm_l2_txn_batch_txs'>;
|
|
showBlockInfo?: boolean;
|
|
socketType?: TxsSocketType;
|
|
currentAddress?: string;
|
|
filter?: React.ReactNode;
|
|
filterValue?: AddressFromToFilter;
|
|
enableTimeIncrement?: boolean;
|
|
top?: number;
|
|
};
|
|
|
|
const TxsWithFrontendSorting = ({
|
|
filter,
|
|
filterValue,
|
|
query,
|
|
showBlockInfo = true,
|
|
socketType,
|
|
currentAddress,
|
|
enableTimeIncrement,
|
|
top,
|
|
}: Props) => {
|
|
const { data, isPlaceholderData, isError, setSortByValue, sorting } = useTxsSort(query);
|
|
|
|
return (
|
|
<TxsContent
|
|
filter={ filter }
|
|
filterValue={ filterValue }
|
|
showBlockInfo={ showBlockInfo }
|
|
socketType={ socketType }
|
|
currentAddress={ currentAddress }
|
|
enableTimeIncrement={ enableTimeIncrement }
|
|
top={ top }
|
|
items={ data?.items }
|
|
isPlaceholderData={ isPlaceholderData }
|
|
isError={ isError }
|
|
setSorting={ setSortByValue }
|
|
sort={ sorting }
|
|
query={ query }
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default TxsWithFrontendSorting;
|