Skip to content

Commit

Permalink
change text on mint nft button
Browse files Browse the repository at this point in the history
  • Loading branch information
uncoolzero committed Apr 10, 2024
1 parent 49aaaf7 commit e9196b3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions projects/ui/src/components/NFT/NFTDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { Button, Dialog, Link } from '@mui/material';
import { FC } from '~/types';
import useSetting from '~/hooks/app/useSetting';
import {
StyledDialogActions,
StyledDialogContent,
Expand All @@ -8,8 +10,6 @@ import {
import { ClaimStatus, Nft } from '../../util/BeaNFTs';
import NFTImage from './NFTImage';

import { FC } from '~/types';

export interface NFTDialogProps {
handleDialogClose: any;
dialogOpen: boolean;
Expand All @@ -24,6 +24,10 @@ const NFTDialog: FC<NFTDialogProps> = ({
nft,
}) => {
const nftImage = <NFTImage nft={nft} />;

// Are we impersonating a different account outside dev mode
const isImpersonating = !!useSetting('impersonatedAccount')[0] && !import.meta.env.DEV;

return (
<Dialog
onClose={handleDialogClose}
Expand Down Expand Up @@ -54,7 +58,7 @@ const NFTDialog: FC<NFTDialogProps> = ({
disabled={nft.claimed === ClaimStatus.CLAIMED}
sx={{ height: '45px', width: '100%' }}
>
{nft.claimed === ClaimStatus.CLAIMED ? 'Minted' : 'Mint'}
{nft.claimed === ClaimStatus.CLAIMED ? 'Minted' : isImpersonating ? 'Impersonating Account' : 'Mint'}
</Button>
</StyledDialogActions>
</Dialog>
Expand Down

0 comments on commit e9196b3

Please sign in to comment.