_error.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import React from "react";
  2. import { useRouter } from "next/router";
  3. import { Button } from "src/components/Button";
  4. import styled from "styled-components";
  5. const StyledNotFound = styled.div`
  6. display: flex;
  7. justify-content: center;
  8. align-items: center;
  9. flex-direction: column;
  10. margin-top: 0 40px;
  11. text-align: center;
  12. `;
  13. const StyledMessage = styled.h4`
  14. color: ${({ theme }) => theme.FULL_WHITE};
  15. font-size: 25px;
  16. font-weight: 600;
  17. margin: 10px 0;
  18. `;
  19. const StyledSubMessage = styled.div`
  20. width: 50%;
  21. color: ${({ theme }) => theme.SILVER};
  22. margin-bottom: 25px;
  23. `;
  24. const StyledImageWrapper = styled.div`
  25. width: 300px;
  26. `;
  27. const NotFound: React.FC = () => {
  28. const router = useRouter();
  29. return (
  30. <StyledNotFound>
  31. <StyledImageWrapper>
  32. <img src="/assets/404.svg" alt="not found" width={300} height={400} />
  33. </StyledImageWrapper>
  34. <StyledMessage>WIZARDS BEHIND CURTAINS?</StyledMessage>
  35. <StyledSubMessage>
  36. Looks like you&apos;re lost, let&apos;s head back to the home!
  37. </StyledSubMessage>
  38. <Button type="button" onClick={() => router.push("/")}>
  39. Go Home
  40. </Button>
  41. </StyledNotFound>
  42. );
  43. };
  44. export default NotFound;