-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
123 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import React from 'react' | ||
import { styled } from '@mui/material/styles' | ||
import Paper from '@mui/material/Paper' | ||
import Modal from '@mui/material/Modal' | ||
import Backdrop from '@mui/material/Backdrop' | ||
import Fade from '@mui/material/Fade' | ||
import Button from '@mui/material/Button' | ||
import Typography from '@mui/material/Typography' | ||
import Link from 'next/link' | ||
|
||
const UnverifiedModal = ({ open, setOpen, error }) => { | ||
const handleClose = () => { | ||
setOpen(false) | ||
} | ||
return ( | ||
<Root> | ||
<StyledModal | ||
aria-labelledby="transition-modal-title" | ||
aria-describedby="transition-modal-description" | ||
open={open} | ||
onClose={() => handleClose()} | ||
closeAfterTransition | ||
BackdropComponent={Backdrop} | ||
BackdropProps={{ | ||
timeout: 500, | ||
}} | ||
> | ||
<Fade in={open}> | ||
<StyledPaper> | ||
<Typography | ||
align="center" | ||
variant="h4" | ||
id="transition-modal-title" | ||
gutterBottom | ||
> | ||
{error} | ||
</Typography> | ||
<Button | ||
style={{ marginTop: '15px' }} | ||
color="primary" | ||
variant="outlined" | ||
> | ||
<Link href="dashboard"> | ||
<Typography>Go to Dashboard</Typography> | ||
</Link> | ||
</Button>{' '} | ||
</StyledPaper> | ||
</Fade> | ||
</StyledModal> | ||
</Root> | ||
) | ||
} | ||
|
||
const Root = styled('div')(() => ({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
width: '100%', | ||
})) | ||
|
||
const StyledModal = styled(Modal)(() => ({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
})) | ||
|
||
const StyledPaper = styled(Paper)(({ theme }) => ({ | ||
backgroundColor: theme.palette.background.paper, | ||
border: '2px solid #000', | ||
boxShadow: theme.shadows[5], | ||
padding: theme.spacing(2, 4, 3), | ||
width: '40vw', | ||
maxHeight: '90vh', | ||
overflowY: 'auto', | ||
zIndex: '10', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
[theme.breakpoints.down('md')]: { | ||
width: 'unset', | ||
margin: '15px', | ||
padding: theme.spacing(2), | ||
}, | ||
})) | ||
|
||
export default UnverifiedModal |
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