Commit c383aa7f authored by isstuev's avatar isstuev

fixes

parent c96fd3da
...@@ -34,12 +34,12 @@ const LatestBlocksItem = ({ block, h }: Props) => { ...@@ -34,12 +34,12 @@ const LatestBlocksItem = ({ block, h }: Props) => {
animate={{ opacity: 1 }} animate={{ opacity: 1 }}
transitionDuration="normal" transitionDuration="normal"
transitionTimingFunction="linear" transitionTimingFunction="linear"
width="100%"
borderRadius="12px" borderRadius="12px"
border="1px solid" border="1px solid"
borderColor={ useColorModeValue('gray.200', 'whiteAlpha.200') } borderColor={ useColorModeValue('gray.200', 'whiteAlpha.200') }
p={ 6 } p={ 6 }
h={ `${ h }px` } h={ `${ h }px` }
minWidth={{ base: '100%', lg: '280px' }}
> >
<Flex justifyContent="space-between" alignItems="center" mb={ 3 }> <Flex justifyContent="space-between" alignItems="center" mb={ 3 }>
<HStack spacing={ 2 }> <HStack spacing={ 2 }>
......
...@@ -12,7 +12,7 @@ import React from 'react'; ...@@ -12,7 +12,7 @@ import React from 'react';
const LatestBlocksItemSkeleton = () => { const LatestBlocksItemSkeleton = () => {
return ( return (
<Box <Box
width="100%" minWidth={{ base: '100%', lg: '280px' }}
borderRadius="12px" borderRadius="12px"
border="1px solid" border="1px solid"
borderColor={ useColorModeValue('gray.200', 'whiteAlpha.200') } borderColor={ useColorModeValue('gray.200', 'whiteAlpha.200') }
......
...@@ -13,8 +13,8 @@ import type { Transaction } from 'types/api/transaction'; ...@@ -13,8 +13,8 @@ import type { Transaction } from 'types/api/transaction';
import appConfig from 'configs/app/config'; import appConfig from 'configs/app/config';
import rightArrowIcon from 'icons/arrows/east.svg'; import rightArrowIcon from 'icons/arrows/east.svg';
import transactionIcon from 'icons/transactions.svg'; import transactionIcon from 'icons/transactions.svg';
import dayjs from 'lib/date/dayjs';
import getValueWithUnit from 'lib/getValueWithUnit'; import getValueWithUnit from 'lib/getValueWithUnit';
import useTimeAgoIncrement from 'lib/hooks/useTimeAgoIncrement';
import Address from 'ui/shared/address/Address'; import Address from 'ui/shared/address/Address';
import AddressIcon from 'ui/shared/address/AddressIcon'; import AddressIcon from 'ui/shared/address/AddressIcon';
import AddressLink from 'ui/shared/address/AddressLink'; import AddressLink from 'ui/shared/address/AddressLink';
...@@ -30,6 +30,7 @@ const LatestBlocksItem = ({ tx }: Props) => { ...@@ -30,6 +30,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
const iconColor = useColorModeValue('blue.600', 'blue.300'); const iconColor = useColorModeValue('blue.600', 'blue.300');
const dataTo = tx.to && tx.to.hash ? tx.to : tx.created_contract; const dataTo = tx.to && tx.to.hash ? tx.to : tx.created_contract;
const timeAgo = useTimeAgoIncrement(tx.timestamp || '0', true);
return ( return (
<Box <Box
...@@ -43,7 +44,9 @@ const LatestBlocksItem = ({ tx }: Props) => { ...@@ -43,7 +44,9 @@ const LatestBlocksItem = ({ tx }: Props) => {
<Flex justifyContent="space-between" width="100%" alignItems="start" flexDirection={{ base: 'column', lg: 'row' }}> <Flex justifyContent="space-between" width="100%" alignItems="start" flexDirection={{ base: 'column', lg: 'row' }}>
<Box width="100%"> <Box width="100%">
<HStack> <HStack>
{ tx.tx_types.map(item => <TxType key={ item } type={ item }/>) } { /* FIXME: mb only one type must be here */ }
<TxType type={ tx.tx_types[0] }/>
{ /* { tx.tx_types.map(item => <TxType key={ item } type={ item }/>) } */ }
<TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined }/> <TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined }/>
</HStack> </HStack>
<Flex <Flex
...@@ -70,7 +73,7 @@ const LatestBlocksItem = ({ tx }: Props) => { ...@@ -70,7 +73,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
/> />
</Address> </Address>
</Flex> </Flex>
<Text variant="secondary" fontWeight="400" fontSize="sm">{ dayjs(tx.timestamp).fromNow() }</Text> { tx.timestamp && <Text variant="secondary" fontWeight="400" fontSize="sm">{ timeAgo }</Text> }
</Flex> </Flex>
</Box> </Box>
<Box> <Box>
......
import { Box, Flex, Icon, Center, Text, LightMode } from '@chakra-ui/react'; import { Flex, Icon, Center, Text, LightMode } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
type Props = { type Props = {
...@@ -10,14 +10,27 @@ type Props = { ...@@ -10,14 +10,27 @@ type Props = {
const StatsItem = ({ icon, title, value }: Props) => { const StatsItem = ({ icon, title, value }: Props) => {
return ( return (
<LightMode> <LightMode>
<Flex background="blue.50" padding={ 5 } borderRadius="16px"> <Flex
<Center backgroundColor="green.100" borderRadius="12px" w={ 10 } h={ 10 } marginRight={ 4 }> backgroundColor="blue.50"
padding={ 5 }
borderRadius="16px"
flexDirection={{ base: 'row', lg: 'column', xl: 'row' }}
alignItems="center"
>
<Center
backgroundColor="green.100"
borderRadius="12px"
w={ 10 }
h={ 10 }
mr={{ base: 4, lg: 0, xl: 4 }}
mb={{ base: 0, lg: 2, xl: 0 }}
>
<Icon as={ icon } boxSize={ 7 } color="black"/> <Icon as={ icon } boxSize={ 7 } color="black"/>
</Center> </Center>
<Box> <Flex flexDirection="column" alignItems={{ base: 'start', lg: 'center', xl: 'start' }}>
<Text variant="secondary" fontSize="xs" lineHeight="16px">{ title }</Text> <Text variant="secondary" fontSize="xs" lineHeight="16px">{ title }</Text>
<Text fontWeight={ 500 } fontSize="md">{ value }</Text> <Text fontWeight={ 500 } fontSize="md">{ value }</Text>
</Box> </Flex>
</Flex> </Flex>
</LightMode> </LightMode>
); );
......
...@@ -55,7 +55,7 @@ const Header = ({ hideOnScrollDown, hasSearch }: Props) => { ...@@ -55,7 +55,7 @@ const Header = ({ hideOnScrollDown, hasSearch }: Props) => {
paddingTop={ 9 } paddingTop={ 9 }
paddingBottom="52px" paddingBottom="52px"
> >
<Box width="100%" opacity={ hasSearch ? 1 : 0 }><SearchBar/></Box> <Box width="100%">{ hasSearch && <SearchBar/> }</Box>
<ColorModeToggler/> <ColorModeToggler/>
<ProfileMenuDesktop/> <ProfileMenuDesktop/>
</HStack> </HStack>
......
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