Skip to content

Commit

Permalink
fix: should show wallet menu in split mode
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Dec 18, 2024
1 parent f182f81 commit a02eab9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 25 deletions.
43 changes: 26 additions & 17 deletions packages/widget/src/components/ContractComponent/NFT/NFTBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ export const NFTBase: React.FC<NFTProps> = ({
}) => {
const { t } = useTranslation()
return (
(<Box sx={{
p: 2
}}>
<Box sx={{
display: "flex"
}}>
<Box
sx={{
p: 2,
}}
>
<Box
sx={{
display: 'flex',
}}
>
{isLoading ? (
<Skeleton
width={96}
Expand All @@ -30,17 +34,20 @@ export const NFTBase: React.FC<NFTProps> = ({
) : (
<PreviewAvatar src={imageUrl} />
)}
<Box sx={{
ml: 2
}}>
<Box
sx={{
ml: 2,
}}
>
{isLoading ? (
<Skeleton width={144} height={21} variant="text" />
) : (
<Typography
sx={{
fontSize: 14,
color: "text.secondary"
}}>
color: 'text.secondary',
}}
>
{collectionName}
</Typography>
)}
Expand All @@ -50,8 +57,9 @@ export const NFTBase: React.FC<NFTProps> = ({
<Typography
sx={{
fontSize: 18,
fontWeight: 600
}}>
fontWeight: 600,
}}
>
{assetName}
</Typography>
)}
Expand All @@ -61,8 +69,9 @@ export const NFTBase: React.FC<NFTProps> = ({
<Typography
sx={{
fontSize: 14,
color: "text.secondary"
}}>
color: 'text.secondary',
}}
>
{t('main.ownedBy')}{' '}
<Link
href={owner.url}
Expand All @@ -77,6 +86,6 @@ export const NFTBase: React.FC<NFTProps> = ({
</Box>
</Box>
<Token token={token} isLoading={isLoading} mt={2} />
</Box>)
);
</Box>
)
}
19 changes: 11 additions & 8 deletions packages/widget/src/components/FeeBreakdownTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const FeeBreakdownTooltip: React.FC<FeeBreakdownTooltipProps> = ({
}) => {
const { t } = useTranslation()
return (
(<Tooltip
<Tooltip
title={
<Box>
{gasCosts?.length ? (
Expand All @@ -28,9 +28,11 @@ export const FeeBreakdownTooltip: React.FC<FeeBreakdownTooltipProps> = ({
</Box>
) : null}
{feeCosts?.length ? (
<Box sx={{
mt: 0.5
}}>
<Box
sx={{
mt: 0.5,
}}
>
{t('main.fees.provider')}
{getFeeBreakdownTypography(feeCosts, t)}
</Box>
Expand All @@ -40,8 +42,8 @@ export const FeeBreakdownTooltip: React.FC<FeeBreakdownTooltipProps> = ({
sx={{ cursor: 'help' }}
>
{children}
</Tooltip>)
);
</Tooltip>
)
}

export const getFeeBreakdownTypography = (
Expand All @@ -54,8 +56,9 @@ export const getFeeBreakdownTypography = (
key={`${fee.token.address}${index}`}
sx={{
fontSize: 12,
fontWeight: "500"
}}>
fontWeight: '500',
}}
>
{t('format.currency', { value: fee.amountUSD })} (
{t('format.number', {
value: Number.parseFloat(formatUnits(fee.amount, fee.token.decimals)),
Expand Down

0 comments on commit a02eab9

Please sign in to comment.