Commit 53c919b1 authored by tom's avatar tom

update address heading info

parent b8eb137f
import { theme } from '@chakra-ui/react'; import { theme } from '@chakra-ui/react';
export const BODY_TYPEFACE = 'Inter'; export const BODY_TYPEFACE = 'Inter';
export const HEADING_TYPEFACE = 'Poppins';
const typography = { const typography = {
fonts: { fonts: {
heading: `Poppins, ${ theme.fonts.heading }`, heading: `${ HEADING_TYPEFACE }, ${ theme.fonts.heading }`,
body: `${ BODY_TYPEFACE }, ${ theme.fonts.body }`, body: `${ BODY_TYPEFACE }, ${ theme.fonts.body }`,
}, },
textStyles: { textStyles: {
......
...@@ -22,7 +22,7 @@ const AddressActions = ({ isLoading }: Props) => { ...@@ -22,7 +22,7 @@ const AddressActions = ({ isLoading }: Props) => {
return ( return (
<Menu> <Menu>
<Skeleton isLoaded={ !isLoading } ml={ 2 }> <Skeleton isLoaded={ !isLoading } ml={ 2 } borderRadius="base">
<MenuButton <MenuButton
as={ Button } as={ Button }
size="sm" size="sm"
......
...@@ -5,7 +5,6 @@ import type { Address } from 'types/api/address'; ...@@ -5,7 +5,6 @@ import type { Address } from 'types/api/address';
import type { TokenInfo } from 'types/api/token'; import type { TokenInfo } from 'types/api/token';
import appConfig from 'configs/app/config'; import appConfig from 'configs/app/config';
import useIsMobile from 'lib/hooks/useIsMobile';
import AddressFavoriteButton from 'ui/address/details/AddressFavoriteButton'; import AddressFavoriteButton from 'ui/address/details/AddressFavoriteButton';
import AddressQrCode from 'ui/address/details/AddressQrCode'; import AddressQrCode from 'ui/address/details/AddressQrCode';
import AddressAddToWallet from 'ui/shared/address/AddressAddToWallet'; import AddressAddToWallet from 'ui/shared/address/AddressAddToWallet';
...@@ -22,8 +21,6 @@ interface Props { ...@@ -22,8 +21,6 @@ interface Props {
} }
const AddressHeadingInfo = ({ address, token, isLinkDisabled, isLoading }: Props) => { const AddressHeadingInfo = ({ address, token, isLinkDisabled, isLoading }: Props) => {
const isMobile = useIsMobile();
return ( return (
<Flex alignItems="center"> <Flex alignItems="center">
<AddressIcon address={ address } isLoading={ isLoading }/> <AddressIcon address={ address } isLoading={ isLoading }/>
...@@ -32,8 +29,8 @@ const AddressHeadingInfo = ({ address, token, isLinkDisabled, isLoading }: Props ...@@ -32,8 +29,8 @@ const AddressHeadingInfo = ({ address, token, isLinkDisabled, isLoading }: Props
hash={ address.hash } hash={ address.hash }
ml={ 2 } ml={ 2 }
fontFamily="heading" fontFamily="heading"
fontSize="lg"
fontWeight={ 500 } fontWeight={ 500 }
truncation={ isMobile ? 'constant' : 'none' }
isDisabled={ isLinkDisabled } isDisabled={ isLinkDisabled }
isLoading={ isLoading } isLoading={ isLoading }
/> />
......
...@@ -33,7 +33,7 @@ const EntityTags = ({ className, data, tagsBefore = [], tagsAfter = [], isLoadin ...@@ -33,7 +33,7 @@ const EntityTags = ({ className, data, tagsBefore = [], tagsAfter = [], isLoadin
] ]
.filter(Boolean); .filter(Boolean);
if (tags.length === 0) { if (tags.length === 0 && !contentAfter) {
return null; return null;
} }
...@@ -78,7 +78,7 @@ const EntityTags = ({ className, data, tagsBefore = [], tagsAfter = [], isLoadin ...@@ -78,7 +78,7 @@ const EntityTags = ({ className, data, tagsBefore = [], tagsAfter = [], isLoadin
})(); })();
return ( return (
<Flex className={ className } columnGap={ 2 } rowGap={ 2 } flexWrap="wrap" alignItems="center"> <Flex className={ className } columnGap={ 2 } rowGap={ 2 } flexWrap="wrap" alignItems="center" flexGrow={ 1 }>
{ content } { content }
{ contentAfter } { contentAfter }
</Flex> </Flex>
......
...@@ -14,7 +14,7 @@ import React, { useCallback, useEffect, useRef } from 'react'; ...@@ -14,7 +14,7 @@ import React, { useCallback, useEffect, useRef } from 'react';
import type { FontFace } from 'use-font-face-observer'; import type { FontFace } from 'use-font-face-observer';
import useFontFaceObserver from 'use-font-face-observer'; import useFontFaceObserver from 'use-font-face-observer';
import { BODY_TYPEFACE } from 'theme/foundations/typography'; import { BODY_TYPEFACE, HEADING_TYPEFACE } from 'theme/foundations/typography';
const TAIL_LENGTH = 4; const TAIL_LENGTH = 4;
const HEAD_MIN_LENGTH = 4; const HEAD_MIN_LENGTH = 4;
...@@ -31,6 +31,7 @@ const HashStringShortenDynamic = ({ hash, fontWeight = '400', isTooltipDisabled ...@@ -31,6 +31,7 @@ const HashStringShortenDynamic = ({ hash, fontWeight = '400', isTooltipDisabled
const isFontFaceLoaded = useFontFaceObserver([ const isFontFaceLoaded = useFontFaceObserver([
{ family: BODY_TYPEFACE, weight: String(fontWeight) as FontFace['weight'] }, { family: BODY_TYPEFACE, weight: String(fontWeight) as FontFace['weight'] },
{ family: HEADING_TYPEFACE, weight: String(fontWeight) as FontFace['weight'] },
]); ]);
const calculateString = useCallback(() => { const calculateString = useCallback(() => {
......
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