-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathDappList.tsx
158 lines (144 loc) · 3.27 KB
/
DappList.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import React, { useRef } from "react";
import styled, { css } from "styled-components";
import { useClickAway } from "react-use";
import Curate from "svgs/icons/curate-image.png";
import Resolver from "svgs/icons/dispute-resolver.svg";
import Escrow from "svgs/icons/escrow.svg";
import Governor from "svgs/icons/governor.svg";
import Court from "svgs/icons/kleros.svg";
import POH from "svgs/icons/poh-image.png";
import Vea from "svgs/icons/vea.svg";
import { landscapeStyle } from "styles/landscapeStyle";
import { responsiveSize } from "styles/responsiveSize";
import Product from "./Product";
const Header = styled.h1`
padding-top: 32px;
padding-bottom: 20px;
font-size: 24px;
font-weight: 600;
line-height: 32.68px;
`;
const Container = styled.div`
display: flex;
position: absolute;
max-height: 340px;
top: 5%;
left: 50%;
transform: translate(-50%);
z-index: 1;
flex-direction: column;
align-items: center;
width: 86vw;
max-width: 480px;
min-width: 300px;
border-radius: 3px;
border: 1px solid ${({ theme }) => theme.stroke};
background-color: ${({ theme }) => theme.whiteBackground};
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.06);
svg {
visibility: visible;
}
${landscapeStyle(
() => css`
margin-top: 64px;
top: 0;
left: 0;
right: auto;
transform: none;
width: ${responsiveSize(300, 480)};
max-height: 80vh;
`
)}
`;
const ItemsDiv = styled.div`
display: grid;
overflow-y: auto;
padding: 16px ${responsiveSize(8, 24, 480)};
row-gap: 8px;
column-gap: 2px;
justify-items: center;
max-width: 480px;
min-width: 300px;
width: ${responsiveSize(300, 480)};
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
`;
const ITEMS = [
{
text: "Court V2",
Icon: Court,
url: "https://v2.kleros.builders/",
},
{
text: "Curate V2",
Icon: Curate,
url: "https://curate-v2.netlify.app/",
},
{
text: "Resolver V2",
Icon: Resolver,
url: "https://v2.kleros.builders/#/resolver",
},
{
text: "Escrow V2",
Icon: Escrow,
url: "https://escrow-v2.kleros.builders/",
},
{
text: "Court V1",
Icon: Court,
url: "https://court.kleros.io/",
},
{
text: "Curate V1",
Icon: Curate,
url: "https://curate.kleros.io",
},
{
text: "Resolver V1",
Icon: Resolver,
url: "https://resolve.kleros.io",
},
{
text: "Escrow V1",
Icon: Escrow,
url: "https://escrow.kleros.io",
},
{
text: "Vea",
Icon: Vea,
url: "https://veascan.io",
},
{
text: "Kleros Scout",
Icon: Curate,
url: "https://klerosscout.eth.limo",
},
{
text: "POH V2",
Icon: POH,
url: "https://v2.proofofhumanity.id",
},
{
text: "Governor",
Icon: Governor,
url: "https://governor.kleros.io",
},
];
interface IDappList {
toggleIsDappListOpen: () => void;
}
const DappList: React.FC<IDappList> = ({ toggleIsDappListOpen }) => {
const containerRef = useRef(null);
useClickAway(containerRef, () => toggleIsDappListOpen());
return (
<Container ref={containerRef}>
<Header>Kleros Solutions</Header>
<ItemsDiv>
{ITEMS.map((item) => {
return <Product {...item} key={item.text} />;
})}
</ItemsDiv>
</Container>
);
};
export default DappList;