-
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.
[AccessDeniedMessage] Use the Alert component instead
- Loading branch information
1 parent
fdd5cbd
commit 80cf4ac
Showing
1 changed file
with
24 additions
and
24 deletions.
There are no files selected for viewing
48 changes: 24 additions & 24 deletions
48
services/frontend/src/components/Routes/AccessDeniedMessage.tsx
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,36 +1,36 @@ | ||
import { DoNotDisturb } from '@mui/icons-material' | ||
import { Container, Box, Link, Paper, Typography } from '@mui/material' | ||
import { Alert, AlertTitle, Box, Container, Link } from '@mui/material' | ||
|
||
import { useTitle } from '@/common/hooks' | ||
import { PageTitle } from '../material/PageTitle' | ||
|
||
export const AccessDeniedMessage = () => { | ||
useTitle('Access denied') | ||
|
||
return ( | ||
<Container maxWidth="md" sx={{ paddingTop: 2 }}> | ||
<Paper | ||
sx={{ | ||
alignItems: 'center', | ||
bgcolor: 'error.light', | ||
color: 'common.white', | ||
display: 'flex', | ||
padding: 2, | ||
}} | ||
<Container maxWidth="md"> | ||
<PageTitle title="Access denied" /> | ||
<Alert | ||
icon={ | ||
<Box | ||
sx={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<DoNotDisturb /> | ||
</Box> | ||
} | ||
severity="error" | ||
variant="outlined" | ||
> | ||
<DoNotDisturb fontSize="large" sx={{ marginRight: 2 }} /> | ||
<Box> | ||
<Typography component="h2" variant="h6"> | ||
Access denied | ||
</Typography> | ||
<Typography variant="body1"> | ||
You don't currently have permission to view this page. If you believe this is a mistake, please contact{' '} | ||
<Link color="inherit" href="mailto:[email protected]" underline="hover"> | ||
[email protected] | ||
</Link> | ||
. | ||
</Typography> | ||
</Box> | ||
</Paper> | ||
<AlertTitle>Access denied</AlertTitle> | ||
You don't currently have permission to view this page. If you believe this is a mistake, please contact{' '} | ||
<Link href="mailto:[email protected]" underline="hover"> | ||
[email protected] | ||
</Link> | ||
. | ||
</Alert> | ||
</Container> | ||
) | ||
} |