Skip to content

Commit

Permalink
fixed: move evm button
Browse files Browse the repository at this point in the history
  • Loading branch information
zzggo committed Dec 6, 2024
1 parent 437a0cc commit 28e1487
Showing 1 changed file with 42 additions and 38 deletions.
80 changes: 42 additions & 38 deletions src/ui/views/MoveBoard/MoveEvm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,46 +449,50 @@ const MoveEvm = (props: MoveBoardProps) => {
isLowStorage={isLowStorage}
isLowStorageAfterAction={isLowStorageAfterAction}
/>
<Button
onClick={moveNFT}
// disabled={sending || occupied}
variant="contained"
color="success"
size="large"
disabled={!collectionDetail || collectionDetail.NftCount === 0}
sx={{
height: '50px',
width: '100%',
borderRadius: '12px',
textTransform: 'capitalize',
display: 'flex',
gap: '12px',
marginBottom: '33px',
mx: '16px',
}}
>
{sending ? (
<>
<LLSpinner size={28} />
<Typography variant="subtitle1" sx={{ fontWeight: 'bold' }} color="text.primary">
{chrome.i18n.getMessage('Sending')}
</Typography>
</>
) : (
<>
{failed ? (
<Typography variant="subtitle1" sx={{ fontWeight: 'bold' }} color="text.primary">
{chrome.i18n.getMessage('Transaction__failed')}
</Typography>
) : (

<Box sx={{ px: '16px' }}>
<Button
onClick={moveNFT}
// disabled={sending || occupied}
variant="contained"
color="success"
size="large"
disabled={
!collectionDetail || (collectionDetail.nfts && collectionDetail.nfts.length === 0)
}
sx={{
height: '50px',
width: '100%',
borderRadius: '12px',
textTransform: 'capitalize',
display: 'flex',
gap: '12px',
marginBottom: '33px',
}}
>
{sending ? (
<>
<LLSpinner size={28} />
<Typography variant="subtitle1" sx={{ fontWeight: 'bold' }} color="text.primary">
{chrome.i18n.getMessage('Move')} {nftIdArray.length > 0 && nftIdArray.length} NFT
{nftIdArray.length > 1 && 's'}
{chrome.i18n.getMessage('Sending')}
</Typography>
)}
</>
)}
</Button>
</>
) : (
<>
{failed ? (
<Typography variant="subtitle1" sx={{ fontWeight: 'bold' }} color="text.primary">
{chrome.i18n.getMessage('Transaction__failed')}
</Typography>
) : (
<Typography variant="subtitle1" sx={{ fontWeight: 'bold' }} color="text.primary">
{chrome.i18n.getMessage('Move')} {nftIdArray.length > 0 && nftIdArray.length} NFT
{nftIdArray.length > 1 && 's'}
</Typography>
)}
</>
)}
</Button>
</Box>
{selectCollection && (
<MoveCollectionSelect
showMoveBoard={selectCollection}
Expand Down

0 comments on commit 28e1487

Please sign in to comment.