Commit 98f4bbad authored by tom's avatar tom

change text

parent f6ac190a
import { Alert, Spinner, Text, Link, useColorModeValue, useTheme } from '@chakra-ui/react'; import { Alert, Text, Link, useColorModeValue, useTheme } from '@chakra-ui/react';
import { transparentize } from '@chakra-ui/theme-tools'; import { transparentize } from '@chakra-ui/theme-tools';
import React from 'react'; import React from 'react';
...@@ -18,18 +18,14 @@ const LatestTxsNotice = ({ className }: Props) => { ...@@ -18,18 +18,14 @@ const LatestTxsNotice = ({ className }: Props) => {
content = 'Connection is lost. Please reload page'; content = 'Connection is lost. Please reload page';
} else if (!num) { } else if (!num) {
content = ( content = (
<> <Text>scanning new transactions...</Text>
<Spinner size="sm" mr={ 3 }/>
<Text>scanning new transactions ...</Text>
</>
); );
} else { } else {
const txsUrl = link('txs'); const txsUrl = link('txs');
content = ( content = (
<> <>
<Spinner size="sm" mr={ 3 }/> <Link href={ txsUrl }>{ num } more transaction{ num > 1 ? 's' : '' }</Link>
<Text as="span" whiteSpace="pre">+ { num } new transaction{ num > 1 ? 's' : '' }. </Text> <Text whiteSpace="pre"> ha{ num > 1 ? 've' : 's' } come in</Text>
<Link href={ txsUrl }>View all</Link>
</> </>
); );
} }
......
import { Alert, Link, chakra } from '@chakra-ui/react'; import { Alert, Link, Text, chakra } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import useNewTxsSocket from 'lib/hooks/useNewTxsSocket'; import useNewTxsSocket from 'lib/hooks/useNewTxsSocket';
...@@ -45,7 +45,8 @@ const TxsNewItemNotice = ({ children, className }: Props) => { ...@@ -45,7 +45,8 @@ const TxsNewItemNotice = ({ children, className }: Props) => {
return ( return (
<Alert className={ className } status="warning" p={ 4 } fontWeight={ 400 }> <Alert className={ className } status="warning" p={ 4 } fontWeight={ 400 }>
<Link onClick={ handleClick }>{ num } more transaction have come in</Link> <Link onClick={ handleClick }>{ num } more transaction{ num > 1 ? 's' : '' }</Link>
<Text whiteSpace="pre"> ha{ num > 1 ? 've' : 's' } come in</Text>
</Alert> </Alert>
); );
})(); })();
......
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