UnexpectedErrorPage.tsx 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import React from "react";
  2. import styled from "styled-components";
  3. const UnexpectedErrorPage = ({ error, resetErrorBoundary }: any) => (
  4. <>
  5. <StyledPageNotFound>
  6. <Mega>
  7. Unknwown
  8. <Inside>Unknown Error</Inside>
  9. </Mega>
  10. <Flex>
  11. <BackButton width="140px" onClick={() => resetErrorBoundary(error)}>
  12. <i className="material-icons">arrow_back</i>
  13. Reload page
  14. </BackButton>
  15. <Splitter>|</Splitter>
  16. <Helper>
  17. Sorry for the inconvenience! The Porter team has been notified.
  18. </Helper>
  19. </Flex>
  20. </StyledPageNotFound>
  21. </>
  22. );
  23. export default UnexpectedErrorPage;
  24. const Splitter = styled.div`
  25. margin: 0 20px;
  26. font-size: 27px;
  27. font-weight: 200;
  28. color: #ffffff15;
  29. `;
  30. const Flex = styled.div`
  31. display: flex;
  32. align-items: center;
  33. justify-content: center;
  34. `;
  35. const Helper = styled.div`
  36. font-size: 15px;
  37. max-width: 550px;
  38. margin-right: -50px;
  39. `;
  40. const BackButton = styled.div`
  41. display: flex;
  42. align-items: center;
  43. justify-content: space-between;
  44. cursor: pointer;
  45. font-size: 13px;
  46. height: 35px;
  47. padding: 5px 16px;
  48. padding-right: 15px;
  49. border: 1px solid #ffffff55;
  50. border-radius: 100px;
  51. width: ${(props: { width: string }) => props.width};
  52. color: white;
  53. background: #ffffff11;
  54. :hover {
  55. background: #ffffff22;
  56. }
  57. > i {
  58. color: white;
  59. font-size: 16px;
  60. margin-right: 6px;
  61. margin-left: -2px;
  62. }
  63. `;
  64. const StyledPageNotFound = styled.div`
  65. font-family: "Work Sans", sans-serif;
  66. color: #6f6f6f;
  67. font-size: 16px;
  68. user-select: none;
  69. margin-top: -80px;
  70. width: 100%;
  71. height: 100%;
  72. display: flex;
  73. flex-direction: column;
  74. align-items: center;
  75. justify-content: center;
  76. `;
  77. const Mega = styled.div`
  78. font-size: 200px;
  79. color: #ffffff06;
  80. position: relative;
  81. font-weight: bold;
  82. text-align: center;
  83. > i {
  84. font-size: 23px;
  85. margin-right: 12px;
  86. }
  87. `;
  88. const Inside = styled.div`
  89. position: absolute;
  90. color: #6f6f6f;
  91. top: 0;
  92. left: 0;
  93. width: 100%;
  94. height: 100%;
  95. display: flex;
  96. align-items: center;
  97. justify-content: center;
  98. font-weight: 400;
  99. font-size: 20px;
  100. > i {
  101. font-size: 23px;
  102. margin-right: 12px;
  103. }
  104. `;