Skip to content

Commit

Permalink
Merge branch 'master' into fix/incorrect-chain-detection
Browse files Browse the repository at this point in the history
  • Loading branch information
kemuru authored Oct 11, 2024
2 parents 8732644 + d98ef63 commit a37faf3
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 36 deletions.
8 changes: 4 additions & 4 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
"@cyntler/react-doc-viewer": "^1.17.0",
"@filebase/client": "^0.0.5",
"@kleros/curate-v2-templates": "workspace:^",
"@kleros/ui-components-library": "^2.13.1",
"@kleros/ui-components-library": "^2.15.0",
"@middy/core": "^5.3.5",
"@middy/http-json-body-parser": "^5.3.5",
"@sentry/react": "^7.93.0",
"@sentry/tracing": "^7.93.0",
"@supabase/supabase-js": "^2.39.3",
"@tanstack/react-query": "^4.28.0",
"@tanstack/react-query": "^5.40.1",
"@web3modal/ethereum": "^2.7.1",
"@web3modal/react": "^2.2.2",
"@web3modal/wagmi": "^5.1.6",
Expand All @@ -98,9 +98,9 @@
"moment": "^2.30.1",
"overlayscrollbars": "^2.4.6",
"overlayscrollbars-react": "^0.5.3",
"react": "^18.2.0",
"react": "^18.3.1",
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-dom": "^18.3.1",
"react-error-boundary": "^3.1.4",
"react-identicons": "^1.2.5",
"react-is": "^18.2.0",
Expand Down
24 changes: 21 additions & 3 deletions web/src/layout/Header/navbar/Menu/Settings/General.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useMemo } from "react";
import styled from "styled-components";
import { useAccount, useDisconnect } from "wagmi";
import { Button } from "@kleros/ui-components-library";
Expand Down Expand Up @@ -64,13 +64,29 @@ const UserContainer = styled.div`
gap: 12px;
`;

const StyledA = styled.a`
text-decoration: none;
label {
cursor: pointer;
color: ${({ theme }) => theme.primaryBlue};
}
:hover {
text-decoration: underline;
}
`;

export const DisconnectWalletButton: React.FC = () => {
const { disconnect } = useDisconnect();
return <Button text={`Disconnect`} onClick={() => disconnect()} />;
};

const General: React.FC = () => {
const { address } = useAccount();
const { address, chain } = useAccount();

const addressExplorerLink = useMemo(() => {
return `${chain?.blockExplorers?.default.url}/address/${address}`;
}, [address, chain]);

return (
<EnsureChainContainer>
<EnsureChain>
Expand All @@ -81,7 +97,9 @@ const General: React.FC = () => {
<IdenticonOrAvatar size="48" />
</StyledAvatarContainer>
<StyledAddressContainer>
<AddressOrName />
<StyledA href={addressExplorerLink} rel="noreferrer" target="_blank">
<AddressOrName />
</StyledA>
</StyledAddressContainer>
<StyledChainContainer>
<ChainDisplay />
Expand Down
80 changes: 51 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5388,14 +5388,14 @@ __metadata:
"@graphql-codegen/client-preset": "npm:^4.2.0"
"@kleros/curate-v2-templates": "workspace:^"
"@kleros/kleros-v2-contracts": "npm:^0.3.2"
"@kleros/ui-components-library": "npm:^2.13.1"
"@kleros/ui-components-library": "npm:^2.15.0"
"@middy/core": "npm:^5.3.5"
"@middy/http-json-body-parser": "npm:^5.3.5"
"@netlify/functions": "npm:^1.6.0"
"@sentry/react": "npm:^7.93.0"
"@sentry/tracing": "npm:^7.93.0"
"@supabase/supabase-js": "npm:^2.39.3"
"@tanstack/react-query": "npm:^4.28.0"
"@tanstack/react-query": "npm:^5.40.1"
"@types/amqplib": "npm:^0.10.4"
"@types/busboy": "npm:^1.5.3"
"@types/react": "npm:^18.2.59"
Expand Down Expand Up @@ -5427,9 +5427,9 @@ __metadata:
moment: "npm:^2.30.1"
overlayscrollbars: "npm:^2.4.6"
overlayscrollbars-react: "npm:^0.5.3"
react: "npm:^18.2.0"
react: "npm:^18.3.1"
react-chartjs-2: "npm:^4.3.1"
react-dom: "npm:^18.2.0"
react-dom: "npm:^18.3.1"
react-error-boundary: "npm:^3.1.4"
react-identicons: "npm:^1.2.5"
react-is: "npm:^18.2.0"
Expand Down Expand Up @@ -5463,9 +5463,9 @@ __metadata:
languageName: node
linkType: hard

"@kleros/ui-components-library@npm:^2.13.1":
version: 2.13.1
resolution: "@kleros/ui-components-library@npm:2.13.1"
"@kleros/ui-components-library@npm:^2.15.0":
version: 2.15.0
resolution: "@kleros/ui-components-library@npm:2.15.0"
dependencies:
"@datepicker-react/hooks": "npm:^2.8.4"
"@swc/helpers": "npm:^0.3.2"
Expand All @@ -5482,7 +5482,7 @@ __metadata:
react-dom: ^18.0.0
react-is: ^18.0.0
styled-components: ^5.3.3
checksum: db710e97b09a291ad5b6ff7a7a046cd3945e0403fda66ce6b33e501609ad2b712f924e84df2cba273d4ee936d274a6b7f210ff269d27d504bc81bcb712bc9da1
checksum: 7c97e8fe45b1cd002a0aaf7fe4670b8c668a3abbbab82fac9261ef9a8382ccaf7d4a974ee54b8f299f1e8e7b68e58dab1f3f31d7c8b3b60c58a5af8abdf4a783
languageName: node
linkType: hard

Expand Down Expand Up @@ -8590,29 +8590,21 @@ __metadata:
languageName: node
linkType: hard

"@tanstack/query-core@npm:4.36.1":
version: 4.36.1
resolution: "@tanstack/query-core@npm:4.36.1"
checksum: 7c648872cd491bcab2aa4c18e0b7ca130c072f05c277a5876977fa3bfa87634bbfde46e9d249236587d78c39866889a02e4e202b478dc6074ff96093732ae56d
"@tanstack/query-core@npm:5.59.4":
version: 5.59.4
resolution: "@tanstack/query-core@npm:5.59.4"
checksum: 176a1133378241ae62ee40252e5261c2c4119c49ee84e2063ac8634fd431c10616b6055d24850c8392ff43c6d56119a915210c284970b26b63759dced7873528
languageName: node
linkType: hard

"@tanstack/react-query@npm:^4.28.0":
version: 4.36.1
resolution: "@tanstack/react-query@npm:4.36.1"
"@tanstack/react-query@npm:^5.40.1":
version: 5.59.4
resolution: "@tanstack/react-query@npm:5.59.4"
dependencies:
"@tanstack/query-core": "npm:4.36.1"
use-sync-external-store: "npm:^1.2.0"
"@tanstack/query-core": "npm:5.59.4"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
react-native: "*"
peerDependenciesMeta:
react-dom:
optional: true
react-native:
optional: true
checksum: 764b860c3ac8d254fc6b07e01054a0f58058644d59626c724b213293fbf1e31c198cbb26e4c32c0d16dcaec0353c0ae19147d9c667675b31f8cea1d64f1ff4ac
react: ^18 || ^19
checksum: 62e36081b7e7c8d4bd7e8a8d2014570e35f78c4aa54279828f3696f5da810db7476a01a4a24ce63c24935284f514e9a4a9ae992a96c6a549f0cbe1ff37f2c451
languageName: node
linkType: hard

Expand Down Expand Up @@ -26349,7 +26341,7 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:^18.0.0, react-dom@npm:^18.2.0":
"react-dom@npm:^18.0.0":
version: 18.2.0
resolution: "react-dom@npm:18.2.0"
dependencies:
Expand All @@ -26361,6 +26353,18 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:^18.3.1":
version: 18.3.1
resolution: "react-dom@npm:18.3.1"
dependencies:
loose-envify: "npm:^1.1.0"
scheduler: "npm:^0.23.2"
peerDependencies:
react: ^18.3.1
checksum: 3f4b73a3aa083091173b29812b10394dd06f4ac06aff410b74702cfb3aa29d7b0ced208aab92d5272919b612e5cda21aeb1d54191848cf6e46e9e354f3541f81
languageName: node
linkType: hard

"react-error-boundary@npm:^3.1.4":
version: 3.1.4
resolution: "react-error-boundary@npm:3.1.4"
Expand Down Expand Up @@ -26673,7 +26677,7 @@ __metadata:
languageName: node
linkType: hard

"react@npm:^18.0.0, react@npm:^18.2.0":
"react@npm:^18.0.0":
version: 18.2.0
resolution: "react@npm:18.2.0"
dependencies:
Expand All @@ -26682,6 +26686,15 @@ __metadata:
languageName: node
linkType: hard

"react@npm:^18.3.1":
version: 18.3.1
resolution: "react@npm:18.3.1"
dependencies:
loose-envify: "npm:^1.1.0"
checksum: 261137d3f3993eaa2368a83110466fc0e558bc2c7f7ae7ca52d94f03aac945f45146bd85e5f481044db1758a1dbb57879e2fcdd33924e2dde1bdc550ce73f7bf
languageName: node
linkType: hard

"read-cache@npm:^1.0.0":
version: 1.0.0
resolution: "read-cache@npm:1.0.0"
Expand Down Expand Up @@ -27703,6 +27716,15 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.23.2":
version: 0.23.2
resolution: "scheduler@npm:0.23.2"
dependencies:
loose-envify: "npm:^1.1.0"
checksum: e8d68b89d18d5b028223edf090092846868a765a591944760942b77ea1f69b17235f7e956696efbb62c8130ab90af7e0949bfb8eba7896335507317236966bc9
languageName: node
linkType: hard

"schema-utils@npm:2.7.0":
version: 2.7.0
resolution: "schema-utils@npm:2.7.0"
Expand Down Expand Up @@ -30802,7 +30824,7 @@ __metadata:
languageName: node
linkType: hard

"use-sync-external-store@npm:1.2.0, use-sync-external-store@npm:^1.2.0":
"use-sync-external-store@npm:1.2.0":
version: 1.2.0
resolution: "use-sync-external-store@npm:1.2.0"
peerDependencies:
Expand Down

0 comments on commit a37faf3

Please sign in to comment.