Commit 34ba27e1 authored by tom's avatar tom

block txs tab

parent 0b0eedbb
import React from 'react';
import TxsContent from 'ui/txs/TxsContent';
const BlockTxs = () => {
return <TxsContent showDescription={ false } showSortButton={ false }/>;
};
export default BlockTxs;
...@@ -4,13 +4,14 @@ import React from 'react'; ...@@ -4,13 +4,14 @@ import React from 'react';
import type { RoutedTab } from 'ui/shared/RoutedTabs/types'; import type { RoutedTab } from 'ui/shared/RoutedTabs/types';
import BlockDetails from 'ui/block/BlockDetails'; import BlockDetails from 'ui/block/BlockDetails';
import BlockTxs from 'ui/block/BlockTxs';
import Page from 'ui/shared/Page'; import Page from 'ui/shared/Page';
import PageHeader from 'ui/shared/PageHeader'; import PageHeader from 'ui/shared/PageHeader';
import RoutedTabs from 'ui/shared/RoutedTabs/RoutedTabs'; import RoutedTabs from 'ui/shared/RoutedTabs/RoutedTabs';
const TABS: Array<RoutedTab> = [ const TABS: Array<RoutedTab> = [
{ routeName: 'block_index', title: 'Details', component: <BlockDetails/> }, { routeName: 'block_index', title: 'Details', component: <BlockDetails/> },
{ routeName: 'block_txs', title: 'Transactions', component: <div>Transactions</div> }, { routeName: 'block_txs', title: 'Transactions', component: <BlockTxs/> },
]; ];
export interface Props { export interface Props {
......
...@@ -14,10 +14,11 @@ import TxsListItem from './TxsListItem'; ...@@ -14,10 +14,11 @@ import TxsListItem from './TxsListItem';
import TxsTable from './TxsTable'; import TxsTable from './TxsTable';
type Props = { type Props = {
isPending?: boolean; showDescription?: boolean;
showSortButton?: boolean;
} }
const TxsContent = ({ isPending }: Props) => { const TxsContent = ({ showSortButton = true, showDescription = true }: Props) => {
const isMobile = useIsMobile(); const isMobile = useIsMobile();
const [ sorting, setSorting ] = useState<Sort>(); const [ sorting, setSorting ] = useState<Sort>();
...@@ -70,7 +71,7 @@ const TxsContent = ({ isPending }: Props) => { ...@@ -70,7 +71,7 @@ const TxsContent = ({ isPending }: Props) => {
return ( return (
<> <>
{ !isPending && <Box mb={ 12 }>Only the first 10,000 elements are displayed</Box> } { showDescription && <Box mb={ 12 }>Only the first 10,000 elements are displayed</Box> }
<HStack mb={ 6 }> <HStack mb={ 6 }>
{ /* TODO */ } { /* TODO */ }
<FilterButton <FilterButton
...@@ -80,11 +81,13 @@ const TxsContent = ({ isPending }: Props) => { ...@@ -80,11 +81,13 @@ const TxsContent = ({ isPending }: Props) => {
onClick={ () => {} } onClick={ () => {} }
appliedFiltersNum={ 0 } appliedFiltersNum={ 0 }
/> />
{ showSortButton && (
<SortButton <SortButton
// eslint-disable-next-line react/jsx-no-bind // eslint-disable-next-line react/jsx-no-bind
handleSort={ () => {} } handleSort={ () => {} }
isSortActive={ Boolean(sorting) } isSortActive={ Boolean(sorting) }
/> />
) }
<FilterInput <FilterInput
// eslint-disable-next-line react/jsx-no-bind // eslint-disable-next-line react/jsx-no-bind
onChange={ () => {} } onChange={ () => {} }
......
...@@ -3,7 +3,7 @@ import React from 'react'; ...@@ -3,7 +3,7 @@ import React from 'react';
import TxsContent from './TxsContent'; import TxsContent from './TxsContent';
const TxsPending = () => { const TxsPending = () => {
return <TxsContent isPending/>; return <TxsContent showDescription={ false }/>;
}; };
export default TxsPending; export default TxsPending;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment