Skip to content

Commit

Permalink
[AccessDeniedMessage] Use the Alert component instead
Browse files Browse the repository at this point in the history
  • Loading branch information
rikurauhala committed Nov 18, 2024
1 parent fdd5cbd commit 80cf4ac
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions services/frontend/src/components/Routes/AccessDeniedMessage.tsx
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>
)
}

0 comments on commit 80cf4ac

Please sign in to comment.