index.tsx 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { useRouter } from "next/router";
  2. import React from "react";
  3. import { Button } from "src/components/Button";
  4. import styled from "styled-components";
  5. export const StyledIncompatible = styled.div`
  6. display: none;
  7. @media only screen and (max-width: 568px) {
  8. position: fixed;
  9. top: 0;
  10. left: 0;
  11. display: flex;
  12. flex-direction: column;
  13. background: ${({ theme }) => theme.BLACK_LIGHT};
  14. color: ${({ theme }) => theme.SILVER};
  15. width: 100%;
  16. height: 100vh;
  17. justify-content: center;
  18. align-items: center;
  19. button {
  20. margin-top: 60px;
  21. }
  22. &::before {
  23. content: "Uh, oh!";
  24. font-weight: 600;
  25. font-size: 60px;
  26. opacity: 0.6;
  27. }
  28. }
  29. `;
  30. export const Incompatible: React.FC = () => {
  31. const route = useRouter();
  32. return (
  33. <StyledIncompatible>
  34. This app is not compatible with your device!
  35. <Button className="incompatible" onClick={() => route.push("/")}>
  36. Go Back
  37. </Button>
  38. </StyledIncompatible>
  39. );
  40. };