diff --git a/app/[localeCode]/error.tsx b/app/[localeCode]/error.tsx new file mode 100644 index 000000000..1cd109941 --- /dev/null +++ b/app/[localeCode]/error.tsx @@ -0,0 +1,7 @@ +'use client'; + +import { Error as ErrorComponent } from '@/modules/Error'; + +export default function Error() { + return ; +} diff --git a/app/global-error.tsx b/app/global-error.tsx new file mode 100644 index 000000000..6e16af2c3 --- /dev/null +++ b/app/global-error.tsx @@ -0,0 +1,91 @@ +'use client'; + +import { Error as ErrorComponent } from '@/modules/Error'; + +import 'modern-normalize/modern-normalize.css'; +import '@/styles/styles.globals.scss'; + +export default function Error() { + return ( + + + + + + + ); +} diff --git a/modules/Error/Error.module.scss b/modules/Error/Error.module.scss new file mode 100644 index 000000000..a0533914e --- /dev/null +++ b/modules/Error/Error.module.scss @@ -0,0 +1,70 @@ +.container { + min-height: 50vh; + display: flex; + align-items: center; + justify-content: center; + font-family: Inter, sans-serif; + text-align: center; +} + +.wrapper { + display: flex; + align-items: center; + flex-direction: column; + padding: $spacing-7; + gap: $spacing-5; + max-width: 900px; + + @include not-desktop { + padding: 0; + } +} + +.title { + color: #1f2937; + font-weight: 700; + font-size: 48px; + line-height: 1.2; + margin-bottom: $spacing-3; +} + +.description { + color: #4b5563; + font-weight: 400; + font-size: $font-size-s; + line-height: 1.6; + margin: 0; +} + +.link { + font-weight: 500; + text-decoration: none; + color: #4f46e5; + outline: none; + border: 0; + background: none; + padding: 0; + + &:hover { + color: #4f46e5; + text-decoration: none; + cursor: pointer; + } +} + +.illustration { + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; +} + +.svg { + width: 400px; + height: 220px; + + @include not-desktop { + width: 245px; + height: 136px; + } +} diff --git a/modules/Error/Error.tsx b/modules/Error/Error.tsx new file mode 100644 index 000000000..ab820e3b3 --- /dev/null +++ b/modules/Error/Error.tsx @@ -0,0 +1,56 @@ +'use client'; + +import classNames from 'classnames'; + +import Illustration from '@/public/images/error.svg'; + +import styles from './Error.module.scss'; + +export function Error() { + function handlePageRefresh() { + window.location.reload(); + } + + return ( +
+
+
+ +
+
+

+ We’re sorry, this site couldn’t load +

+

+ Try to{' '} + {' '} + the page, or visit the platform’s{' '} + + status page + {' '} + to see if any incidents are affecting the platform. You can also reach out + to support via{' '} + + {' '} + email + + . +

+
+
+
+ ); +} diff --git a/modules/Error/index.ts b/modules/Error/index.ts new file mode 100644 index 000000000..9b35c9f37 --- /dev/null +++ b/modules/Error/index.ts @@ -0,0 +1 @@ +export { Error } from './Error'; diff --git a/public/images/error.svg b/public/images/error.svg new file mode 100644 index 000000000..c8ba6e14f --- /dev/null +++ b/public/images/error.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +