Skip to content

Commit

Permalink
feat: minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavkparti committed Jul 16, 2023
1 parent 4126802 commit aa92187
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions src/pages/SendTokens/TokenInfoBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,31 @@ const AmountText = styled(Typography)({
color: 'rgb(97,137,47)',
textAlign: 'center',
overflowWrap: 'break-word',
paddingTop: '10px',
paddingBottom: '10px',
});


const SubWalletInfo = ({ subWalletName, subWalletTokens }) => {
return (
<>
<Grid item xs={3}>
</Grid>
<Grid item xs={9} sx={{ borderTop: '1px solid rgb(97,137,47)' }}>
</Grid>

<Grid item xs={3} sx={{ minHeight: '65px' }}>
</Grid>
<Grid item xs={5}>
<AmountText>{subWalletTokens}</AmountText>
</Grid>
<Grid item xs={4}>
<SubText>{subWalletName} Tokens</SubText>
</Grid>
</>
);
};

const TokenInfoBlock = ({ totalTokens, subWalletName = null, subWalletTokens = null }) => {
return (
<Paper sx={{ width: '255px' }}>
Expand All @@ -39,21 +61,7 @@ const TokenInfoBlock = ({ totalTokens, subWalletName = null, subWalletTokens = n
</Grid>

{subWalletName && subWalletTokens &&
<>
<Grid item xs={3}>
</Grid>
<Grid item xs={9} sx={{ borderTop: '2px solid rgb(97,137,47)' }}>
</Grid>

<Grid item xs={3} sx={{ minHeight: '65px' }}>
</Grid>
<Grid item xs={5}>
<AmountText>{subWalletTokens}</AmountText>
</Grid>
<Grid item xs={4} sx={{ justifyContent: 'center' }}>
<SubText>{subWalletName} Tokens</SubText>
</Grid>
</>
<SubWalletInfo subWalletTokens={subWalletTokens} subWalletName={subWalletName} />
}
</Grid>
</Paper>
Expand Down

0 comments on commit aa92187

Please sign in to comment.