-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feat/google-translate
- Loading branch information
Showing
5 changed files
with
222 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@kleros/kleros-sdk", | ||
"version": "2.1.8", | ||
"version": "2.1.9", | ||
"description": "SDK for Kleros version 2", | ||
"repository": "[email protected]:kleros/kleros-v2.git", | ||
"homepage": "https://github.com/kleros/kleros-v2/tree/master/kleros-sdk#readme", | ||
|
@@ -39,13 +39,16 @@ | |
"rimraf": "^6.0.1", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.6.3", | ||
"viem": "^2.21.48", | ||
"vitest": "^1.6.0" | ||
}, | ||
"dependencies": { | ||
"@reality.eth/reality-eth-lib": "^3.2.44", | ||
"@urql/core": "^5.0.8", | ||
"mustache": "^4.2.0", | ||
"viem": "^2.21.48", | ||
"zod": "^3.23.8" | ||
}, | ||
"peerDependencies": { | ||
"viem": "^2.21.48" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<FallbackProps> = ({ error, resetErrorBoundary }) => { | ||
// eslint-disable-next-line no-console | ||
console.log("Error:", { error }); | ||
|
||
return ( | ||
<> | ||
<HeroImage /> | ||
<Container> | ||
<ErrorContainer> | ||
<InfoWrapper> | ||
<HeaderIconContainer> | ||
<ErrorIcon /> | ||
</HeaderIconContainer> | ||
<Header>Ooops, Something went wrong in Athens!</Header> | ||
<Subtitle>Please reload the page or contact us if the issue is not resolved.</Subtitle> | ||
<ButtonsContainer> | ||
<Button text={"Reload"} onClick={resetErrorBoundary} /> | ||
<a href={"https://t.me/kleros"} target="_blank" rel="noreferrer"> | ||
<Button text={"Contact us"} /> | ||
</a> | ||
</ButtonsContainer> | ||
</InfoWrapper> | ||
<IconContainer> | ||
<ErrorIcon /> | ||
</IconContainer> | ||
</ErrorContainer> | ||
</Container> | ||
</> | ||
); | ||
}; | ||
|
||
export default ErrorFallback; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters