Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skeleton for portfolio value sum #947

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions components/UI/profileCard/profileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,25 @@ const ProfileCard: FunctionComponent<ProfileCardProps> = ({
{identity.domain?.domain || 'Unknown Domain'}
</Typography>
<div className={styles.address_div}>
<div className='flex items-center gap-2'>
<Typography
<div className='flex items-center gap-2 h-6'>
{totalBalance === null?
<Skeleton
variant='text'
sx={{ bgcolor: "grey.600" }}
width={60}
height={30}
/>
:
<>
<Typography
type={TEXT_TYPE.BODY_SMALL}
className={`${styles.wallet_amount} font-extrabold`}
>
{totalBalance !== null ? (
hidePortfolio ? (
'******'
) : (
`$${totalBalance.toFixed(2)}`
`$${totalBalance?.toFixed(2)}`
)
) : (
<Skeleton
Expand All @@ -184,11 +193,13 @@ const ProfileCard: FunctionComponent<ProfileCardProps> = ({
)}
</Typography>
<div
onClick={() => setHidePortfolio(!hidePortfolio)}
className='cursor-pointer'
>
{hidePortfolio ? <EyeIconSlashed /> : <EyeIcon />}
</div>
onClick={() => setHidePortfolio(!hidePortfolio)}
className='cursor-pointer'
>
{hidePortfolio ? <EyeIconSlashed /> : <EyeIcon />}
</div>
</>
}
</div>
</div>
<div className='flex sm:hidden justify-center py-4'>
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.