diff --git a/packages/ui/src/components/transactions_list/components/desktop/index.tsx b/packages/ui/src/components/transactions_list/components/desktop/index.tsx index 8771b44232..e3ebc58f9e 100644 --- a/packages/ui/src/components/transactions_list/components/desktop/index.tsx +++ b/packages/ui/src/components/transactions_list/components/desktop/index.tsx @@ -18,6 +18,7 @@ import AutoSizer from 'react-virtualized-auto-sizer'; import { VariableSizeGrid as Grid } from 'react-window'; import InfiniteLoader from 'react-window-infinite-loader'; import FilterTxsByType from '@/components/transaction_type_filter'; +import NoData from '@/components/no_data'; const useRenderHeaderCell = ({ columnIndex, @@ -87,6 +88,14 @@ const Desktop: FC = ({ // Default isItemLoaded function const defaultIsItemLoaded = () => true; + // Render NoData component if itemCount is 0 + const noDataComponent = + itemCount === 0 ? ( +
+ +
+ ) : null; + return (
@@ -177,6 +186,7 @@ const Desktop: FC = ({ )} + {noDataComponent}
); }; diff --git a/packages/ui/src/components/transactions_list/index.tsx b/packages/ui/src/components/transactions_list/index.tsx index e0c8caf9ed..100343c484 100644 --- a/packages/ui/src/components/transactions_list/index.tsx +++ b/packages/ui/src/components/transactions_list/index.tsx @@ -1,6 +1,5 @@ import { FC } from 'react'; import Loading from '@/components/loading'; -import NoData from '@/components/no_data'; import Desktop from '@/components/transactions_list/components/desktop'; import Mobile from '@/components/transactions_list/components/mobile'; import type { TransactionsListState } from '@/components/transactions_list/types'; @@ -30,7 +29,7 @@ const TransactionsList: FC = (props) => { }; if (!itemCount) { - return isNextPageLoading ? : ; + if (isNextPageLoading) return ; } return (