Skip to content

Commit 469d5dd

Browse files
authored
Merge pull request #10263 from ethereum/dev
Deploy v7.12.2
2 parents 29d1081 + 5a622c2 commit 469d5dd

File tree

134 files changed

+3291
-1827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+3291
-1827
lines changed

i18n/config.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,14 @@
271271
"langDir": "ltr",
272272
"dateFormat": "MM/DD/YYYY"
273273
},
274+
{
275+
"code": "pcm",
276+
"hrefLang": "pcm",
277+
"name": "Nigerian Pidgin",
278+
"localName": "Nigerian Pidgin",
279+
"langDir": "ltr",
280+
"dateFormat": "DD/MM/YYYY"
281+
},
274282
{
275283
"code": "ph",
276284
"hrefLang": "fil",
@@ -392,9 +400,9 @@
392400
"dateFormat": "MM/DD/YYYY"
393401
},
394402
{
395-
"code": "ur-in",
396-
"hrefLang": "ur-in",
397-
"name": "Urdu (India)",
403+
"code": "ur",
404+
"hrefLang": "ur",
405+
"name": "Urdu",
398406
"localName": "اردو",
399407
"langDir": "rtl",
400408
"dateFormat": "MM/DD/YYYY"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "7.12.1",
3+
"version": "7.12.2",
44
"description": "Website of ethereum.org",
55
"main": "index.js",
66
"repository": "git@github.com:ethereum/ethereum-org-website.git",

src/assets/wallets/enkrypt.png

-16.1 KB
Loading

src/components/EthExchanges/index.tsx

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
import React from "react"
2+
import { Box, Center, chakra, Flex, Heading, Text } from "@chakra-ui/react"
3+
4+
import CardList from "../CardList"
5+
import Link from "../Link"
6+
import Emoji from "../Emoji"
7+
import Translation from "../Translation"
8+
import { StyledSelect as Select } from "../SharedStyledComponents"
9+
10+
import { ChildOnlyProp } from "../../types"
11+
import { useEthExchanges } from "./use-eth-exchanges"
12+
13+
const ListContainer = (props: ChildOnlyProp) => (
14+
<Box mt={16} flex={{ base: "1 1 100%", md: "1 1 50%" }} {...props} />
15+
)
16+
17+
const ResultsContainer = (props: ChildOnlyProp) => (
18+
<Flex
19+
justify="center"
20+
w="full"
21+
maxWidth="876px"
22+
flexWrap={{ base: "wrap", md: "initial" }}
23+
sx={{
24+
"& > *": {
25+
_first: {
26+
mr: { base: 0, md: 6 },
27+
},
28+
},
29+
}}
30+
{...props}
31+
/>
32+
)
33+
34+
const EmptyStateContainer = (props: ChildOnlyProp) => (
35+
<Center flexDir="column" mt={16} {...props} />
36+
)
37+
38+
const SuccessContainer = (props: ChildOnlyProp) => (
39+
<Flex flexDir="column" mt={4} {...props} />
40+
)
41+
42+
const EmptyStateText = (props: ChildOnlyProp) => (
43+
<Text m={8} fontSize="xl" maxW="450px" textAlign="center" {...props} />
44+
)
45+
46+
const StyledSelect = chakra(Select, {
47+
baseStyle: {
48+
maxW: "container.sm",
49+
},
50+
})
51+
52+
const NoResults = ({ children }) => (
53+
<EmptyStateContainer>
54+
<Emoji text=":crying_face:" fontSize="80px" />
55+
<EmptyStateText>
56+
{children}{" "}
57+
<Link to="mailto:website@ethereum.org">website@ethereum.org</Link>.
58+
</EmptyStateText>
59+
</EmptyStateContainer>
60+
)
61+
62+
const NoResultsSingle = ({ children }) => (
63+
<Center flexDir="column" mt={6}>
64+
<Text maxW="450px" mb={16}>
65+
{children}{" "}
66+
<Link to="mailto:website@ethereum.org">website@ethereum.org</Link>.
67+
</Text>
68+
<Emoji text=":crying_face:" fontSize="80px" />
69+
</Center>
70+
)
71+
72+
// TODO move component into get-eth.js page?
73+
const EthExchanges = () => {
74+
const {
75+
exchangesByCountry,
76+
handleSelectChange,
77+
hasSelectedCountry,
78+
placeholderString,
79+
t,
80+
hasExchangeResults,
81+
hasWalletResults,
82+
filteredExchanges,
83+
filteredWallets,
84+
lastUpdated,
85+
} = useEthExchanges()
86+
87+
return (
88+
<Flex flexDir="column" align="center" w="full">
89+
<Heading fontSize={{ base: "2xl", md: "2rem" }} fontWeight={600} lineHeight={1.4}>
90+
<Translation id="page-get-eth-exchanges-header" />
91+
</Heading>
92+
<Text maxW="container.sm" mb={8} lineHeight={1.4} textAlign="center">
93+
<Translation id="page-get-eth-exchanges-intro" />
94+
</Text>
95+
<StyledSelect
96+
aria-label={t("page-get-eth-exchanges-header")}
97+
className="react-select-container"
98+
classNamePrefix="react-select"
99+
options={exchangesByCountry}
100+
onChange={handleSelectChange}
101+
placeholder={placeholderString}
102+
/>
103+
{!hasSelectedCountry && (
104+
<EmptyStateContainer>
105+
<Emoji text=":world_map:" fontSize="80px" />
106+
<EmptyStateText>
107+
<Translation id="page-get-eth-exchanges-empty-state-text" />
108+
</EmptyStateText>
109+
</EmptyStateContainer>
110+
)}
111+
{/* No results */}
112+
{hasSelectedCountry && !hasExchangeResults && !hasWalletResults && (
113+
<ResultsContainer>
114+
<NoResults>
115+
<Translation id="page-get-eth-exchanges-no-exchanges-or-wallets" />
116+
</NoResults>
117+
</ResultsContainer>
118+
)}
119+
{/* Has results */}
120+
{(hasExchangeResults || hasWalletResults) && (
121+
<>
122+
<ResultsContainer>
123+
<ListContainer>
124+
<Heading
125+
as="h3"
126+
fontSize={{ base: "xl", md: "2xl" }}
127+
fontWeight={600}
128+
lineHeight={1.4}
129+
>
130+
<Translation id="page-get-eth-exchanges-header-exchanges" />
131+
</Heading>
132+
{hasExchangeResults && (
133+
<SuccessContainer>
134+
<Text>
135+
<Translation id="page-get-eth-exchanges-success-exchange" />
136+
</Text>
137+
<CardList content={filteredExchanges} />
138+
</SuccessContainer>
139+
)}
140+
{!hasExchangeResults && (
141+
<NoResultsSingle>
142+
<Translation id="page-get-eth-exchanges-no-exchanges" />
143+
</NoResultsSingle>
144+
)}
145+
</ListContainer>
146+
<ListContainer>
147+
<Heading
148+
as="h3"
149+
fontSize={{ base: "xl", md: "2xl" }}
150+
fontWeight={600}
151+
lineHeight={1.4}
152+
>
153+
<Translation id="page-get-eth-exchanges-header-wallets" />
154+
</Heading>
155+
156+
{hasWalletResults && (
157+
<SuccessContainer>
158+
<Text>
159+
<Translation id="page-get-eth-exchanges-success-wallet-paragraph" />{" "}
160+
<Link to="/wallets/">
161+
<Translation id="page-get-eth-exchanges-success-wallet-link" />
162+
</Link>
163+
.
164+
</Text>
165+
<CardList content={filteredWallets} />
166+
</SuccessContainer>
167+
)}
168+
{!hasWalletResults && (
169+
<NoResultsSingle>
170+
<Translation id="page-get-eth-exchanges-no-wallets" />
171+
</NoResultsSingle>
172+
)}
173+
</ListContainer>
174+
</ResultsContainer>
175+
<Text w="full" maxW="876px" mt={16} mb={0}>
176+
<Translation id="page-get-eth-exchanges-disclaimer" />{" "}
177+
<Link to="mailto:website@ethereum.org">website@ethereum.org</Link>.{" "}
178+
<Translation id="page-find-wallet-last-updated" />{" "}
179+
<strong>{lastUpdated}</strong>
180+
</Text>
181+
</>
182+
)}
183+
</Flex>
184+
)
185+
}
186+
187+
export default EthExchanges

0 commit comments

Comments
 (0)