Commit 4a8f8a3d authored by isstuev's avatar isstuev

fix show/hide

parent b60507a0
...@@ -14,6 +14,7 @@ import { ...@@ -14,6 +14,7 @@ import {
PopoverBody, PopoverBody,
useColorModeValue, useColorModeValue,
Show, Show,
Hide,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
...@@ -113,7 +114,7 @@ const TxsTableItem = ({ tx }: {tx: Transaction}) => { ...@@ -113,7 +114,7 @@ const TxsTableItem = ({ tx }: {tx: Transaction}) => {
{ addressTo } { addressTo }
</Td> </Td>
</Show> </Show>
<Show below="xl" ssr={ false }> <Hide above="xl" ssr={ false }>
<Td colSpan={ 3 }> <Td colSpan={ 3 }>
<Box> <Box>
{ addressFrom } { addressFrom }
...@@ -128,7 +129,7 @@ const TxsTableItem = ({ tx }: {tx: Transaction}) => { ...@@ -128,7 +129,7 @@ const TxsTableItem = ({ tx }: {tx: Transaction}) => {
{ addressTo } { addressTo }
</Box> </Box>
</Td> </Td>
</Show> </Hide>
<Td isNumeric> <Td isNumeric>
<CurrencyValue value={ tx.value }/> <CurrencyValue value={ tx.value }/>
</Td> </Td>
......
import { Box, Show } from '@chakra-ui/react'; import { Box, Show, Hide } from '@chakra-ui/react';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import type { TransactionsResponse } from 'types/api/transaction'; import type { TransactionsResponse } from 'types/api/transaction';
...@@ -29,7 +29,7 @@ const TxsWithSort = ({ ...@@ -29,7 +29,7 @@ const TxsWithSort = ({
return ( return (
<> <>
<Show below="lg" ssr={ false }><Box>{ sortedTxs.map(tx => <TxsListItem tx={ tx } key={ tx.hash }/>) }</Box></Show> <Show below="lg" ssr={ false }><Box>{ sortedTxs.map(tx => <TxsListItem tx={ tx } key={ tx.hash }/>) }</Box></Show>
<Show above="lg" ssr={ false }><TxsTable txs={ sortedTxs } sort={ sort } sorting={ sorting }/></Show> <Hide below="lg" ssr={ false }><TxsTable txs={ sortedTxs } sort={ sort } sorting={ sorting }/></Hide>
</> </>
); );
......
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