-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into chore-remove-wf
- Loading branch information
Showing
40 changed files
with
304 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,72 @@ | ||
import { | ||
MultisigConfirmationModal, | ||
MultisigConfirmationModalContainer, | ||
MultisigConfirmationModalIcon, | ||
MultisigConfirmationModalIconContainer, | ||
} from 'src/components/MultisigConfirmationModal'; | ||
import { InfoAlert } from '../InfoAlert'; | ||
import { Modal, Theme, Typography, useMediaQuery } from '@mui/material'; | ||
import { Button } from 'src/components/Button'; | ||
import { useEffect, useState } from 'react'; | ||
import { useMetaMask } from 'src/hooks/useMetaMask'; | ||
|
||
export const WalletAlert = () => { | ||
const title = 'Metamask update is required ⚠️'; | ||
const [isOpen, setIsOpen] = useState<boolean>(false); | ||
const { isMetaMaskConnector } = useMetaMask(); | ||
|
||
const title = 'Metamask update is required'; | ||
const subtitle = | ||
'Please update MetaMask to the latest version. This update solves a bug present in older versions.'; | ||
const isMobile = useMediaQuery((theme: Theme) => | ||
theme.breakpoints.down('md'), | ||
); | ||
|
||
useEffect(() => { | ||
if (isMetaMaskConnector) { | ||
setIsOpen(true); | ||
} | ||
}, [isMetaMaskConnector]); | ||
|
||
const onClose = () => { | ||
setIsOpen(false); | ||
}; | ||
|
||
return ( | ||
<> | ||
<InfoAlert active={true} title={title} subtitle={subtitle} /> | ||
{isMobile ? ( | ||
<Modal open={isOpen} onClose={onClose}> | ||
<MultisigConfirmationModalContainer> | ||
<MultisigConfirmationModalIconContainer> | ||
<MultisigConfirmationModalIcon /> | ||
</MultisigConfirmationModalIconContainer> | ||
<Typography | ||
fontWeight={700} | ||
textAlign={'center'} | ||
marginY={4} | ||
style={{ | ||
fontSize: '1.125rem', | ||
}} | ||
> | ||
{title} | ||
</Typography> | ||
<Typography fontSize={'1.125 rem'} marginY={4}> | ||
{subtitle} | ||
</Typography> | ||
<Button | ||
variant="primary" | ||
muiVariant="contained" | ||
styles={{ | ||
width: '100%', | ||
}} | ||
onClick={onClose} | ||
> | ||
{'I confirm'} | ||
</Button> | ||
</MultisigConfirmationModalContainer> | ||
</Modal> | ||
) : ( | ||
<InfoAlert active={true} title={title} subtitle={subtitle} /> | ||
)} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/Superfest/NFTClaimingBox/NFTCard/NFTCard.style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.