All files / src/components NotFoundView.tsx

0% Statements 0/1
100% Branches 0/0
0% Functions 0/1
0% Lines 0/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29                                                         
// Something the user asked for doesn't exist (or isn't theirs): a title, a
// short text and the way back.
import Button from '@mui/material/Button'
import Stack from '@mui/material/Stack'
import Typography from '@mui/material/Typography'
import { Link } from '@tanstack/react-router'
 
export function NotFoundView(props: {
  title: string
  text: string
  /** The link back to the home page. */
  backLabel: string
}) {
  return (
    <Stack component="main" sx={{ gap: 1, px: 2.5, py: 6 }}>
      <Typography variant="h1">{props.title}</Typography>
      <Typography color="text.secondary">{props.text}</Typography>
      <Button
        component={Link}
        to="/"
        variant="outlined"
        sx={{ alignSelf: 'flex-start', mt: 2 }}
      >
        {props.backLabel}
      </Button>
    </Stack>
  )
}