import { Container, Heading, Link, Text } from "@chakra-ui/react";
import { PageContextBuiltIn } from "vite-plugin-ssr";

export function Page(pageProps: PageContextBuiltIn) {
  if (pageProps.is404)
    return (
      <Container maxW="container.lg" pt="8vh" textAlign="left">
        <Heading size="4xl">404</Heading>
        <br />
        <Text fontSize="xl">There is nothing to find here.</Text>
        <br />
        <br />
        <br />
        <Link color="#646cff" onClick={() => history.go(-1)}>
          Go back
        </Link>
      </Container>
    );

  return (
    <Container maxW="container.lg" pt="8vh" textAlign="left">
      <Heading size="4xl">500</Heading>
      <br />
      <Text fontSize="xl">S̶̡͈̠̗̠͖͙̭o̶̶͕͚̥͍̪̤m̸̨͏͈͔̖͚̖̰̱͞e҉̵͖͚͇̀t̕͟͠͏͎̺̯̲̱̣̤̠̟͙̠̙̫̬ḩ̸̭͓̬͎̙̀į̞̮͉͖̰̥̹͚̫̙̪̗̜̳̕ͅn҉͔̯̪̗̝̝͖̲͇͍͎̲̲̤̖̫͈̪͡g̴̰̻̙̝͉̭͇̖̰̝̙͕̼͙͘͜ ̵̶̫̥̳̲̘̻̗͈͕̭̲͇̘̜̺̟̥̖̥b̴̙̭̹͕̞͠r̞͎̠̩͈̖̰̞̯̯͢͢͠ͅo̝̯̗̹̳͍̰͉͕̘̰̠̺̥̰͔̕ͅk̵̸̻̠͕̺̦̦͖̲̺̦̞̝̞͞͡e̶͏̤̼̼͔̘̰̰̭͈̀͞͡</Text>
      <br />
      <br />
      <br />
      <Link color="#646cff" onClick={() => location.reload()}>
        Reload
      </Link>
    </Container>
  );
}
