Skip to content

Commit 0efbd87

Browse files
committed
Merge branch 'find-wallet-revamp' of github.com:ethereum/ethereum-org-website into find-wallet-revamp
2 parents 5f6da2e + 119bfa3 commit 0efbd87

File tree

92 files changed

+1737
-2184
lines changed

Some content is hidden

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

92 files changed

+1737
-2184
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"i18next": "^23.6.0",
3737
"lodash.merge": "^4.6.2",
3838
"lodash.shuffle": "^4.2.0",
39+
"lodash.union": "^4.6.0",
3940
"next": "13.4.8",
4041
"next-i18next": "^14.0.3",
4142
"next-mdx-remote": "^3.0.8",

public/content/translations/es/developers/tutorials/how-to-mint-an-nft/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Como acuñar un NFT (parte 2/3 de la serie de tutoriales de NFT)
33
description: Este tutorial describe como acuñar un NFT en la cadena de bloques de Ethereum usando nuestro contrato inteligente y Web3.
44
author: "Sumi Mudgil"
55
tags:
6-
- "NTF"
6+
- "NFT"
77
- "ERC-721"
88
- "alchemy"
99
- "solidity"

public/content/translations/es/developers/tutorials/how-to-view-nft-in-metamask/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Cómo visualizar su NFT en su cartera (parte 3/3 de la serie de tutoriale
33
description: Este tutorial explica cómo visualizar un NFT en MetaMask
44
author: "Sumi Mudgil"
55
tags:
6-
- "NTF"
6+
- "NFT"
77
- "ERC-721"
88
- "Alchemy"
99
- "tókenes no fungibles"

public/content/translations/es/developers/tutorials/how-to-write-and-deploy-an-nft/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Cómo escribir & y desplegar un NFT (parte 1/3 de la serie de tutoriales
33
description: Este tutorial es la parte 1 de una serie sobre NFT que le indicará cómo escribir y desplegar un contrato inteligente de un token no fungible o NFT (ERC-721 token) paso a paso usando Ethereum y el sistema de archivos interplanetario (IPFS).
44
author: "Sumi Mudgil"
55
tags:
6-
- "NTF"
6+
- "NFT"
77
- "ERC-721"
88
- "Alchemy"
99
- "Solidity"

public/wallets/okx.jpeg

-1.12 KB
Binary file not shown.

src/components/DataProductCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const DataProductCard = ({
129129
objectFit="cover"
130130
alt=""
131131
minWidth="24px"
132-
me="0.5rem"
132+
me={2}
133133
/>
134134
)}
135135
{coin}
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
import { ReactNode, useContext } from "react"
2+
import { useRouter } from "next/router"
3+
import { useTranslation } from "next-i18next"
4+
import {
5+
AccordionButton,
6+
AccordionIcon,
7+
AccordionItem,
8+
AccordionPanel,
9+
Box,
10+
Heading,
11+
List,
12+
Text,
13+
} from "@chakra-ui/react"
14+
15+
import Select from "@/components/Select"
16+
17+
import { getLanguageCodeName } from "@/lib/utils/intl"
18+
import { trackCustomEvent } from "@/lib/utils/matomo"
19+
import {
20+
getAllWalletsLanguages,
21+
getWalletsTopLanguages,
22+
} from "@/lib/utils/wallets"
23+
24+
import { WalletSupportedLanguageContext } from "@/contexts/WalletSupportedLanguageContext"
25+
26+
export const LanguageSupportFilter = () => {
27+
const { t } = useTranslation("page-wallets-find-wallet")
28+
const { locale } = useRouter()
29+
30+
// Context API
31+
const { supportedLanguage, setSupportedLanguage } = useContext(
32+
WalletSupportedLanguageContext
33+
)
34+
35+
const allWalletsLanguages = getAllWalletsLanguages(locale!)
36+
const allWalletsLanguagesOptions = allWalletsLanguages!.map(
37+
({ langCode, langName }) => {
38+
return {
39+
label: langName,
40+
value: langCode,
41+
}
42+
}
43+
)
44+
45+
const handleLanguageFilterSelectChange = (selectedLanguage) => {
46+
if (!selectedLanguage) return
47+
48+
setSupportedLanguage(selectedLanguage.value)
49+
50+
trackCustomEvent({
51+
eventCategory: "WalletFilterSidebar",
52+
eventAction: `Language search`,
53+
eventName: getLanguageCodeName(selectedLanguage.value, locale!),
54+
})
55+
}
56+
57+
return (
58+
<AccordionItem
59+
background="background.highlight"
60+
borderRadius="base"
61+
borderColor="transparent"
62+
p={6}
63+
zIndex={1}
64+
>
65+
{({ isExpanded }) => (
66+
<>
67+
<Heading
68+
as="h3"
69+
borderBottom={isExpanded ? "1px" : "none"}
70+
borderColor="body.light"
71+
fontSize="lg"
72+
fontWeight={600}
73+
lineHeight={1.4}
74+
py={1}
75+
ps={4}
76+
pe={2.5}
77+
borderRadius={1}
78+
_hover={{ color: "primary.hover" }}
79+
>
80+
<AccordionButton
81+
color="inherit"
82+
fontWeight="inherit"
83+
fontSize="inherit"
84+
p={0}
85+
textAlign="initial"
86+
_hover={{ background: "transparent" }}
87+
>
88+
<Text as="span" flex={1}>
89+
{t("page-find-wallet-languages-supported")}
90+
</Text>
91+
92+
<AccordionIcon
93+
color="primary.base"
94+
boxSize={9}
95+
_hover={{ color: "primary.hover" }}
96+
/>
97+
</AccordionButton>
98+
</Heading>
99+
100+
<AccordionPanel as={List} p={0} m={0}>
101+
<Select
102+
instanceId="language-support-filter"
103+
aria-label={t("page-find-wallet-languages-supported")}
104+
aria-placeholder={t("page-find-wallet-languages-search-language")}
105+
options={allWalletsLanguagesOptions}
106+
onChange={handleLanguageFilterSelectChange}
107+
placeholder={getLanguageCodeName(supportedLanguage, locale!)}
108+
isSearchable
109+
variant="outline"
110+
/>
111+
112+
<Box mt={2}>
113+
<Text color="body.medium" size="sm">
114+
{t("page-find-wallet-popular-languages")}
115+
</Text>
116+
117+
{getWalletsTopLanguages(5, locale!)
118+
.map<ReactNode>((language) => {
119+
return (
120+
<Text
121+
key={language.code}
122+
as="span"
123+
color="primary.base"
124+
size="sm"
125+
cursor="pointer"
126+
onClick={() => {
127+
setSupportedLanguage(language.code)
128+
129+
trackCustomEvent({
130+
eventCategory: "WalletFilterSidebar",
131+
eventAction: `Language search`,
132+
eventName: getLanguageCodeName(
133+
language.code,
134+
locale!
135+
),
136+
})
137+
}}
138+
>
139+
{language.langName}
140+
</Text>
141+
)
142+
})
143+
// `.reduce()` used to generate the comma separator between languages
144+
.reduce((prev, curr) => [prev, ", ", curr])}
145+
</Box>
146+
</AccordionPanel>
147+
</>
148+
)}
149+
</AccordionItem>
150+
)
151+
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
import { useContext } from "react"
2+
import { useTranslation } from "next-i18next"
3+
import { Box, Text } from "@chakra-ui/react"
4+
5+
import { WalletFilter } from "@/lib/types"
6+
7+
import { Button } from "@/components/Buttons"
8+
9+
import { trackCustomEvent } from "@/lib/utils/matomo"
10+
import { walletsListingCount } from "@/lib/utils/wallets"
11+
12+
import { DEFAULT_LOCALE, NAV_BAR_PX_HEIGHT } from "@/lib/constants"
13+
14+
import { FilterBurgerIcon } from "../icons/wallets"
15+
16+
import { WalletSupportedLanguageContext } from "@/contexts/WalletSupportedLanguageContext"
17+
18+
interface MobileFiltersButtonProps {
19+
filters: WalletFilter
20+
showMobileSidebar: boolean
21+
onOpen: () => void
22+
onClose: () => void
23+
}
24+
25+
export const MobileFiltersButton = ({
26+
filters,
27+
showMobileSidebar,
28+
onOpen,
29+
onClose,
30+
}: MobileFiltersButtonProps) => {
31+
const { t } = useTranslation("page-wallets-find-wallet")
32+
33+
// Context API
34+
const { supportedLanguage } = useContext(WalletSupportedLanguageContext)
35+
36+
return (
37+
<Box
38+
position="sticky"
39+
top={NAV_BAR_PX_HEIGHT}
40+
bg="background.base"
41+
w="full"
42+
zIndex="docked"
43+
py="5px"
44+
>
45+
<Button
46+
rightIcon={<FilterBurgerIcon />}
47+
variant="outline"
48+
border="none"
49+
ps={0}
50+
ms={4}
51+
gap={4}
52+
sx={{
53+
svg: {
54+
boxSize: 8,
55+
line: { stroke: "primary.base" },
56+
circle: { stroke: "primary.base" },
57+
},
58+
}}
59+
onClick={() => {
60+
showMobileSidebar ? onClose() : onOpen()
61+
trackCustomEvent({
62+
eventCategory: "MobileFilterToggle",
63+
eventAction: `Tap MobileFilterToggle`,
64+
eventName: `show mobile filters ${!showMobileSidebar}`,
65+
})
66+
}}
67+
>
68+
<Box>
69+
<Text align="start">{t("page-find-wallet-filters")}</Text>
70+
<Text
71+
align="start"
72+
fontSize="sm"
73+
lineHeight="14px"
74+
color="body.medium"
75+
>
76+
{walletsListingCount(filters) +
77+
(supportedLanguage === DEFAULT_LOCALE ? 0 : 1)}{" "}
78+
{t("page-find-wallet-active")}
79+
</Text>
80+
</Box>
81+
</Button>
82+
</Box>
83+
)
84+
}

0 commit comments

Comments
 (0)