Commit a2aaae0b authored by isstuev's avatar isstuev

fixes

parent d7075bc8
...@@ -120,11 +120,11 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD ...@@ -120,11 +120,11 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
}; };
const handleSocketClose = React.useCallback(() => { const handleSocketClose = React.useCallback(() => {
setSocketAlert('Connection is lost. Please click here to load new token transfers.'); setSocketAlert('Connection is lost. Please refresh the page to load new token transfers.');
}, []); }, []);
const handleSocketError = React.useCallback(() => { const handleSocketError = React.useCallback(() => {
setSocketAlert('An error has occurred while fetching new token transfers. Please click here to refresh the page.'); setSocketAlert('An error has occurred while fetching new token transfers. Please refresh the page.');
}, []); }, []);
const channel = useSocketChannel({ const channel = useSocketChannel({
...@@ -179,18 +179,21 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD ...@@ -179,18 +179,21 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
showTxInfo showTxInfo
top={ 80 } top={ 80 }
enableTimeIncrement enableTimeIncrement
showSocketInfo showSocketInfo={ pagination.page === 1 }
socketInfoAlert={ socketAlert } socketInfoAlert={ socketAlert }
socketInfoNum={ newItemsCount } socketInfoNum={ newItemsCount }
/> />
</Hide> </Hide>
<Show below="lg"> <Show below="lg">
<SocketNewItemsNotice { pagination.page === 1 && (
url={ window.location.href } <SocketNewItemsNotice
num={ newItemsCount } url={ window.location.href }
alert={ socketAlert } num={ newItemsCount }
type="token_transfer" alert={ socketAlert }
/> type="token_transfer"
borderBottomRadius={ 0 }
/>
) }
<TokenTransferList <TokenTransferList
data={ items } data={ items }
baseAddress={ currentAddress } baseAddress={ currentAddress }
......
...@@ -101,11 +101,11 @@ const AddressTxs = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLDivElement>} ...@@ -101,11 +101,11 @@ const AddressTxs = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLDivElement>}
}; };
const handleSocketClose = React.useCallback(() => { const handleSocketClose = React.useCallback(() => {
setSocketAlert('Connection is lost. Please click here to load new transactions.'); setSocketAlert('Connection is lost. Please refresh the page to load new transactions.');
}, []); }, []);
const handleSocketError = React.useCallback(() => { const handleSocketError = React.useCallback(() => {
setSocketAlert('An error has occurred while fetching new transactions. Please click here to refresh the page.'); setSocketAlert('An error has occurred while fetching new transactions. Please refresh the page.');
}, []); }, []);
const channel = useSocketChannel({ const channel = useSocketChannel({
......
...@@ -75,7 +75,12 @@ const TxsContent = ({ ...@@ -75,7 +75,12 @@ const TxsContent = ({
<Show below="lg" ssr={ false }> <Show below="lg" ssr={ false }>
<Box> <Box>
{ showSocketInfo && ( { showSocketInfo && (
<SocketNewItemsNotice url={ window.location.href } num={ socketInfoNum } alert={ socketInfoAlert }> <SocketNewItemsNotice
url={ window.location.href }
num={ socketInfoNum }
alert={ socketInfoAlert }
borderBottomRadius={ 0 }
>
{ ({ content }) => <Box>{ content }</Box> } { ({ content }) => <Box>{ content }</Box> }
</SocketNewItemsNotice> </SocketNewItemsNotice>
) } ) }
......
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