Skip to content

Commit 971bcb2

Browse files
authored
Merge pull request #15 from kleros/chore(web)/update-ui-library-version-and-dapplist-refactor
chore(web): update-ui-library-version-and-dapplist-refactor
2 parents 740cb2e + 1482a0f commit 971bcb2

File tree

4 files changed

+63
-44
lines changed

4 files changed

+63
-44
lines changed

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
},
7373
"dependencies": {
7474
"@filebase/client": "^0.0.5",
75-
"@kleros/ui-components-library": "^2.7.1",
75+
"@kleros/ui-components-library": "^2.8.1",
7676
"@sentry/react": "^7.93.0",
7777
"@sentry/tracing": "^7.93.0",
7878
"@supabase/supabase-js": "^2.39.3",

web/src/layout/Header/navbar/DappList.tsx

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import React, { useRef } from "react";
22
import styled, { css } from "styled-components";
3-
import { useClickAway } from "react-use";
43
import { landscapeStyle } from "styles/landscapeStyle";
4+
import { responsiveSize } from "styles/responsiveSize";
5+
import { useClickAway } from "react-use";
56
import Curate from "svgs/icons/curate-image.png";
67
import Resolver from "svgs/icons/dispute-resolver.svg";
78
import Escrow from "svgs/icons/escrow.svg";
89
import Governor from "svgs/icons/governor.svg";
910
import Court from "svgs/icons/kleros.svg";
10-
import Linguo from "svgs/icons/linguo.svg";
1111
import POH from "svgs/icons/poh-image.png";
1212
import Vea from "svgs/icons/vea.svg";
13-
import Tokens from "svgs/icons/tokens.svg";
1413
import Product from "./Product";
1514

1615
const Header = styled.h1`
@@ -51,7 +50,7 @@ const Container = styled.div`
5150
left: 0;
5251
right: auto;
5352
transform: none;
54-
width: calc(300px + (480 - 300) * (100vw - 375px) / (1250 - 375));
53+
width: ${responsiveSize(300, 480)};
5554
max-height: 80vh;
5655
`
5756
)}
@@ -60,56 +59,71 @@ const Container = styled.div`
6059
const ItemsDiv = styled.div`
6160
display: grid;
6261
overflow-y: auto;
63-
padding: 16px calc(8px + (24 - 8) * ((100vw - 480px) / (1250 - 480)));
62+
padding: 16px ${responsiveSize(8, 24, 480)};
6463
row-gap: 8px;
6564
column-gap: 2px;
6665
justify-items: center;
6766
max-width: 480px;
6867
min-width: 300px;
69-
width: calc(300px + (480 - 300) * (100vw - 375px) / (1250 - 375));
68+
width: ${responsiveSize(300, 480)};
7069
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
7170
`;
7271

7372
const ITEMS = [
7473
{
75-
text: "Court v1",
74+
text: "Court V2",
7675
Icon: Court,
77-
url: "https://court.kleros.io/",
76+
url: "https://v2.kleros.builders/",
7877
},
7978
{
80-
text: "Vea",
81-
Icon: Vea,
82-
url: "https://veascan.io",
79+
text: "Curate V2",
80+
Icon: Curate,
81+
url: "https://curate-v2.netlify.app/",
82+
},
83+
{
84+
text: "Resolver V2",
85+
Icon: Resolver,
86+
url: "https://v2.kleros.builders/#/resolver",
8387
},
8488
{
85-
text: "Escrow",
89+
text: "Escrow V2",
8690
Icon: Escrow,
87-
url: "https://escrow.kleros.io",
91+
url: "https://escrow-v2.kleros.builders/",
8892
},
8993
{
90-
text: "POH",
91-
Icon: POH,
92-
url: "https://app.proofofhumanity.id",
94+
text: "Court V1",
95+
Icon: Court,
96+
url: "https://court.kleros.io/",
9397
},
9498
{
95-
text: "Curate",
99+
text: "Curate V1",
96100
Icon: Curate,
97101
url: "https://curate.kleros.io",
98102
},
99103
{
100-
text: "Tokens",
101-
Icon: Tokens,
102-
url: "https://tokens.kleros.io",
103-
},
104-
{
105-
text: "Resolver",
104+
text: "Resolver V1",
106105
Icon: Resolver,
107106
url: "https://resolve.kleros.io",
108107
},
109108
{
110-
text: "Linguo",
111-
Icon: Linguo,
112-
url: "https://linguo.kleros.io",
109+
text: "Escrow V1",
110+
Icon: Escrow,
111+
url: "https://escrow.kleros.io",
112+
},
113+
{
114+
text: "Vea",
115+
Icon: Vea,
116+
url: "https://veascan.io",
117+
},
118+
{
119+
text: "Perma Curate",
120+
Icon: Curate,
121+
url: "https://perma-curate.eth.limo/",
122+
},
123+
{
124+
text: "POH V1",
125+
Icon: POH,
126+
url: "https://app.proofofhumanity.id",
113127
},
114128
{
115129
text: "Governor",

web/src/layout/Header/navbar/Product.tsx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React from "react";
22
import styled from "styled-components";
3+
import { responsiveSize } from "styles/responsiveSize";
34

45
const Container = styled.a`
56
cursor: pointer;
67
display: flex;
78
flex-direction: column;
89
align-items: center;
9-
padding: 20px 25px 35px 25px;
10+
padding: 20px 8px 35px 8px;
1011
max-width: 100px;
1112
border-radius: 3px;
1213
:hover {
@@ -15,22 +16,26 @@ const Container = styled.a`
1516
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
1617
}
1718
gap: 8px;
18-
width: calc(100px + (130 - 100) * (100vw - 375px) / (1250 - 375));
19-
white-space: nowrap;
19+
width: ${responsiveSize(100, 130)};
2020
2121
background-color: ${({ theme }) => theme.lightBackground};
22-
small {
23-
font-weight: 400;
24-
line-height: 19px;
25-
font-size: 14px;
26-
}
2722
`;
2823

29-
const StyledIcon = styled.svg``;
24+
const StyledIcon = styled.svg`
25+
width: 48px;
26+
height: 48px;
27+
`;
3028

3129
const StyledImg = styled.img`
32-
max-width: 48px;
33-
max-height: 48px;
30+
width: 48px;
31+
height: 48px;
32+
`;
33+
34+
const StyledSmall = styled.small`
35+
display: flex;
36+
font-weight: 400;
37+
line-height: 19px;
38+
text-align: center;
3439
`;
3540

3641
interface IProduct {
@@ -43,7 +48,7 @@ const Product: React.FC<IProduct> = ({ text, url, Icon }) => {
4348
return (
4449
<Container href={url} target="_blank">
4550
{typeof Icon === "string" ? <StyledImg alt={Icon} src={Icon} /> : <StyledIcon as={Icon} />}
46-
<small>{text}</small>
51+
<StyledSmall>{text}</StyledSmall>
4752
</Container>
4853
);
4954
};

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4782,7 +4782,7 @@ __metadata:
47824782
"@filebase/client": "npm:^0.0.5"
47834783
"@graphql-codegen/cli": "npm:^4.0.1"
47844784
"@graphql-codegen/client-preset": "npm:^4.2.0"
4785-
"@kleros/ui-components-library": "npm:^2.7.1"
4785+
"@kleros/ui-components-library": "npm:^2.8.1"
47864786
"@netlify/functions": "npm:^1.6.0"
47874787
"@parcel/transformer-svg-react": "npm:2.11.0"
47884788
"@parcel/watcher": "npm:~2.2.0"
@@ -4850,9 +4850,9 @@ __metadata:
48504850
languageName: node
48514851
linkType: hard
48524852

4853-
"@kleros/ui-components-library@npm:^2.7.1":
4854-
version: 2.7.1
4855-
resolution: "@kleros/ui-components-library@npm:2.7.1"
4853+
"@kleros/ui-components-library@npm:^2.8.1":
4854+
version: 2.8.1
4855+
resolution: "@kleros/ui-components-library@npm:2.8.1"
48564856
dependencies:
48574857
"@datepicker-react/hooks": "npm:^2.8.4"
48584858
"@swc/helpers": "npm:^0.3.2"
@@ -4869,7 +4869,7 @@ __metadata:
48694869
react-dom: ^18.0.0
48704870
react-is: ^18.0.0
48714871
styled-components: ^5.3.3
4872-
checksum: 63339c0487b1645eef312e2b0734c9a8aebaa1746706033f40b5d35409a71e7cebbef2884fdb2d901bd1415ebc737d152be35ec9ffde67f180455a96f7acd34a
4872+
checksum: 78c05b2217a4d04d554a81cee6fbcdb6c6d2a1ccb92a42118d75b477e076b0c21682916e65a8495c8d70e0763ab7a9062080d4c2f29fb49fc55536879b65f446
48734873
languageName: node
48744874
linkType: hard
48754875

0 commit comments

Comments
 (0)