diff --git a/web/package.json b/web/package.json
index 0e0f3c17c..c12dbc666 100644
--- a/web/package.json
+++ b/web/package.json
@@ -106,7 +106,7 @@
"react": "^18.3.1",
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.3.1",
- "react-error-boundary": "^3.1.4",
+ "react-error-boundary": "^4.1.2",
"react-identicons": "^1.2.5",
"react-is": "^18.3.1",
"react-loading-skeleton": "^3.5.0",
diff --git a/web/src/app.tsx b/web/src/app.tsx
index a961e70ca..23a158b6c 100644
--- a/web/src/app.tsx
+++ b/web/src/app.tsx
@@ -1,9 +1,11 @@
import React, { lazy, Suspense } from "react";
+import { ErrorBoundary } from "react-error-boundary";
import { Route } from "react-router-dom";
import "react-loading-skeleton/dist/skeleton.css";
import "react-toastify/dist/ReactToastify.css";
+
import AtlasProvider from "context/AtlasProvider";
import GraphqlBatcherProvider from "context/GraphqlBatcher";
import IsListProvider from "context/IsListProvider";
@@ -22,84 +24,87 @@ import Web3Provider from "context/Web3Provider";
import Loader from "components/Loader";
import Layout from "layout/index";
+import ErrorFallback from "./components/ErrorFallback";
import { SentryRoutes } from "./utils/sentry";
const App: React.FC = () => {
return (
-
-
-
-
-
-
-
- }>
- }>
-
-
- }
- />
- }>
-
-
- }
- />
- }>
-
-
- }
- />
- }>
-
-
- }
- />
- }>
-
-
- }
- />
- }>
-
-
- }
- />
- }>
-
-
- }
- />
- Justice not found here ¯\_( ͡° ͜ʖ ͡°)_/¯} />
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ }>
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ }>
+
+
+ }
+ />
+ Justice not found here ¯\_( ͡° ͜ʖ ͡°)_/¯} />
+
+
+
+
+
+
+
+
+
);
};
diff --git a/web/src/components/ErrorFallback.tsx b/web/src/components/ErrorFallback.tsx
new file mode 100644
index 000000000..6b9fef67b
--- /dev/null
+++ b/web/src/components/ErrorFallback.tsx
@@ -0,0 +1,129 @@
+import React from "react";
+import styled, { css } from "styled-components";
+
+import { FallbackProps } from "react-error-boundary";
+
+import { Button } from "@kleros/ui-components-library";
+
+import ErrorIcon from "svgs/icons/warning-outline.svg";
+
+import { landscapeStyle } from "styles/landscapeStyle";
+import { responsiveSize } from "styles/responsiveSize";
+
+import HeroImage from "./HeroImage";
+
+const Container = styled.div`
+ width: 100%;
+ height: 100vh;
+ background-color: ${({ theme }) => theme.lightBackground};
+ padding: ${responsiveSize(32, 80)} ${responsiveSize(24, 136)} ${responsiveSize(76, 96)};
+ max-width: 1780px;
+ margin: 0 auto;
+`;
+
+const ErrorContainer = styled.div`
+ display: flex;
+ width: 100%;
+ gap: 48px 16px;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ ${landscapeStyle(
+ () => css`
+ flex-direction: row;
+ justify-content: space-between;
+ `
+ )}
+`;
+
+const InfoWrapper = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 32px;
+ align-items: center;
+ flex: 1;
+ ${landscapeStyle(
+ () => css`
+ align-items: start;
+ `
+ )}
+`;
+
+const textCss = css`
+ margin: 0;
+ text-align: center;
+ white-space: pre-line;
+
+ ${landscapeStyle(
+ () => css`
+ text-align: left;
+ `
+ )}
+`;
+
+const Header = styled.h1`
+ ${textCss}
+`;
+
+const Subtitle = styled.h3`
+ ${textCss}
+ max-width: 735px;
+`;
+
+const HeaderIconContainer = styled.div`
+ svg {
+ width: 64px;
+ height: 64px;
+ path {
+ fill: ${({ theme }) => theme.error};
+ }
+ }
+`;
+
+const ButtonsContainer = styled.div`
+ display: flex;
+ gap: 16px;
+`;
+
+const IconContainer = styled.div`
+ svg {
+ width: 250px;
+ height: 250px;
+ path {
+ fill: ${({ theme }) => theme.whiteBackground};
+ }
+ }
+`;
+
+const ErrorFallback: React.FC = ({ error, resetErrorBoundary }) => {
+ // eslint-disable-next-line no-console
+ console.log("Error:", { error });
+
+ return (
+ <>
+
+
+
+
+
+
+
+ Ooops, Something went wrong in Athens!
+ Please reload the page or contact us if the issue is not resolved.
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
+
+export default ErrorFallback;
diff --git a/yarn.lock b/yarn.lock
index 894a9c314..04ce59bcb 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5250,7 +5250,7 @@ __metadata:
react: "npm:^18.3.1"
react-chartjs-2: "npm:^4.3.1"
react-dom: "npm:^18.3.1"
- react-error-boundary: "npm:^3.1.4"
+ react-error-boundary: "npm:^4.1.2"
react-identicons: "npm:^1.2.5"
react-is: "npm:^18.3.1"
react-loading-skeleton: "npm:^3.5.0"
@@ -29443,14 +29443,14 @@ __metadata:
languageName: node
linkType: hard
-"react-error-boundary@npm:^3.1.4":
- version: 3.1.4
- resolution: "react-error-boundary@npm:3.1.4"
+"react-error-boundary@npm:^4.1.2":
+ version: 4.1.2
+ resolution: "react-error-boundary@npm:4.1.2"
dependencies:
"@babel/runtime": "npm:^7.12.5"
peerDependencies:
react: ">=16.13.1"
- checksum: 10/7418637bf352b88f35ff3798e6faa094ee046df9d422fc08f54c017892c3c0738dac661ba3d64d97209464e7a60e7fbbeffdbeaee5edc38f3aaf5f1f4a8bf610
+ checksum: 10/a8b59e5ef891bb6c48874d12c72bbd1a9292a56751adeee5666e228bd3a4913084329a9c21f7baafa0df68dc6d25e18883edb25946ce5763981885cbb93786eb
languageName: node
linkType: hard