Skip to content

Commit ca65d9c

Browse files
authored
Merge pull request #15660 from ethereum/staging
Deploy v10.6.1
2 parents a83a17a + 2ac5f68 commit ca65d9c

File tree

533 files changed

+19347
-5727
lines changed

Some content is hidden

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

533 files changed

+19347
-5727
lines changed

.all-contributorsrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4039,7 +4039,9 @@
40394039
"profile": "https://github.com/lukassim",
40404040
"contributions": [
40414041
"content",
4042-
"ideas"
4042+
"ideas",
4043+
"translation",
4044+
"bug"
40434045
]
40444046
},
40454047
{

.eslintrc.json

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
2-
"extends": [
3-
"eslint:recommended",
4-
"plugin:@typescript-eslint/recommended",
5-
"next/core-web-vitals",
6-
"prettier",
7-
"plugin:storybook/recommended"
8-
],
2+
"extends": ["eslint:recommended", "next/core-web-vitals", "prettier"],
93
"env": {
10-
"es6": true
4+
"es6": true,
5+
"node": true,
6+
"browser": true
117
},
128
"plugins": ["simple-import-sort", "@typescript-eslint", "unused-imports"],
139
"parser": "@typescript-eslint/parser",
10+
"parserOptions": {
11+
"ecmaVersion": "latest",
12+
"sourceType": "module",
13+
"ecmaFeatures": {
14+
"jsx": true
15+
}
16+
},
1417
"rules": {
1518
"simple-import-sort/imports": [
1619
"error",
@@ -34,7 +37,7 @@
3437
// From the `constants` directory.
3538
["^@/lib/constants"],
3639
// `.storybook` directory and utils files`
37-
["^@/storybook","^@/storybook-utils"],
40+
["^@/storybook", "^@/storybook-utils"],
3841
// Parent imports. Put `..` last.
3942
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
4043
// Other relative imports. Put same-folder imports and `.` last.
@@ -48,13 +51,6 @@
4851
],
4952
"simple-import-sort/exports": "error",
5053
"no-unused-vars": "off",
51-
"@typescript-eslint/no-unused-vars": "off",
52-
"@typescript-eslint/no-explicit-any": [
53-
"error",
54-
{
55-
"fixToUnknown": true
56-
}
57-
],
5854
"unused-imports/no-unused-vars": [
5955
"error",
6056
{
@@ -63,6 +59,37 @@
6359
"varsIgnorePattern": "^_$"
6460
}
6561
],
66-
"unused-imports/no-unused-imports-ts": "warn"
67-
}
62+
"unused-imports/no-unused-imports": "warn"
63+
},
64+
"overrides": [
65+
{
66+
"files": ["**/*.{ts,tsx}"],
67+
"extends": ["plugin:@typescript-eslint/recommended"],
68+
"rules": {
69+
"@typescript-eslint/no-explicit-any": [
70+
"error",
71+
{
72+
"fixToUnknown": true
73+
}
74+
]
75+
}
76+
},
77+
{
78+
"files": ["**/*.stories.@(js|jsx|ts|tsx|mdx)"],
79+
"extends": ["plugin:storybook/recommended"]
80+
}
81+
],
82+
"ignorePatterns": [
83+
"node_modules/",
84+
".next/",
85+
"out/",
86+
"dist/",
87+
"build/",
88+
".vercel/",
89+
".netlify/",
90+
"coverage/",
91+
"storybook-static/",
92+
"**/*.d.ts",
93+
"src/intl/"
94+
]
6895
}

.mise.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[settings]
2+
# tools can read the versions files used by other version managers
3+
# for example, .nvmrc in the case of node's nvm
4+
idiomatic_version_file_enable_tools = ['node']

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
20.19.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
774774
<td align="center" valign="top" width="14.28%"><a href="http://linkedin.com/in/kamilzarzycki/"><img src="https://avatars.githubusercontent.com/u/26347436?v=4?s=100" width="100px;" alt="Kamil Zarzycki"/><br /><sub><b>Kamil Zarzycki</b></sub></a><br /><a href="#translation-Ryeore" title="Translation">🌍</a> <a href="#content-Ryeore" title="Content">🖋</a></td>
775775
<td align="center" valign="top" width="14.28%"><a href="https://www.stockholmblockchain.com"><img src="https://avatars.githubusercontent.com/u/10158281?v=4?s=100" width="100px;" alt="Filip Martinsson"/><br /><sub><b>Filip Martinsson</b></sub></a><br /><a href="#content-filipmartinsson" title="Content">🖋</a></td>
776776
<td align="center" valign="top" width="14.28%"><a href="https://www.zeroservices.eu"><img src="https://avatars.githubusercontent.com/u/78486441?v=4?s=100" width="100px;" alt="zeroservices"/><br /><sub><b>zeroservices</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Azeroservices" title="Bug reports">🐛</a></td>
777-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lukassim"><img src="https://avatars.githubusercontent.com/u/37338979?v=4?s=100" width="100px;" alt="LukaK"/><br /><sub><b>LukaK</b></sub></a><br /><a href="#content-lukassim" title="Content">🖋</a> <a href="#ideas-lukassim" title="Ideas, Planning, & Feedback">🤔</a></td>
777+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lukassim"><img src="https://avatars.githubusercontent.com/u/37338979?v=4?s=100" width="100px;" alt="LukaK"/><br /><sub><b>LukaK</b></sub></a><br /><a href="#content-lukassim" title="Content">🖋</a> <a href="#ideas-lukassim" title="Ideas, Planning, & Feedback">🤔</a> <a href="#translation-lukassim" title="Translation">🌍</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Alukassim" title="Bug reports">🐛</a></td>
778778
<td align="center" valign="top" width="14.28%"><a href="http://lukeingalls.com"><img src="https://avatars.githubusercontent.com/u/45518011?v=4?s=100" width="100px;" alt="Luke Ingalls"/><br /><sub><b>Luke Ingalls</b></sub></a><br /><a href="#content-lukeingalls" title="Content">🖋</a></td>
779779
</tr>
780780
<tr>

app/[locale]/10years/_components/AdoptionSwiper.tsx

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
"use client"
22

3+
import type { StaticImageData } from "next/image"
4+
import { useTranslations } from "next-intl"
5+
36
import { Image } from "@/components/Image"
7+
import Translation from "@/components/Translation"
48
import { ButtonLink } from "@/components/ui/buttons/Button"
59
import {
610
Swiper,
@@ -11,38 +15,50 @@ import {
1115

1216
import { cn } from "@/lib/utils/cn"
1317

14-
import { AdoptionCard } from "./types"
15-
1618
type AdoptionCardProps = {
17-
adoptionCards: AdoptionCard[]
19+
adoptionCards: { image: StaticImageData; href: string }[]
1820
adoptionStyles: string[]
1921
}
22+
2023
const AdoptionSwiper = ({
2124
adoptionCards,
2225
adoptionStyles,
2326
}: AdoptionCardProps) => {
27+
const t = useTranslations("page-10-year-anniversary")
28+
2429
return (
2530
<div className="flex flex-1 flex-col gap-6 md:hidden">
2631
<SwiperContainer className="mx-auto w-full max-w-[550px]">
2732
<Swiper spaceBetween={32}>
28-
{adoptionCards.map((card, index) => (
29-
<SwiperSlide key={card.title}>
30-
<div
31-
className={cn("h-full rounded-2xl p-8", adoptionStyles[index])}
32-
>
33-
<Image
34-
src={card.image}
35-
alt={card.title}
36-
className="mx-auto mb-4 h-36 object-contain"
37-
/>
38-
<h3 className="mb-4 text-2xl font-bold">{card.title}</h3>
39-
{card.description}
40-
<ButtonLink href={card.href} hideArrow variant="outline">
41-
{card.linkText}
42-
</ButtonLink>
43-
</div>
44-
</SwiperSlide>
45-
))}
33+
{adoptionCards.map((card, index) => {
34+
const title = t(`page-10-year-adoption-card-${index + 1}-title`)
35+
return (
36+
<SwiperSlide key={title}>
37+
<div
38+
className={cn(
39+
"h-full rounded-2xl p-8",
40+
adoptionStyles[index]
41+
)}
42+
>
43+
<Image
44+
src={card.image}
45+
alt={title}
46+
className="mx-auto mb-4 h-36 object-contain"
47+
/>
48+
<h3 className="mb-4 text-2xl font-bold">{title}</h3>
49+
<p className="mb-8">
50+
<Translation
51+
id={`page-10-year-adoption-card-${index + 1}-description`}
52+
ns="page-10-year-anniversary"
53+
/>
54+
</p>
55+
<ButtonLink href={card.href} hideArrow variant="outline">
56+
{t(`page-10-year-adoption-card-${index + 1}-link-text`)}
57+
</ButtonLink>
58+
</div>
59+
</SwiperSlide>
60+
)
61+
})}
4662
<SwiperNavigation />
4763
</Swiper>
4864
</SwiperContainer>

app/[locale]/10years/_components/CountDown.tsx

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
import { useEffect, useState } from "react"
44

5+
import type { TimeLeftLabels } from "@/lib/types"
6+
57
import { cn } from "@/lib/utils/cn"
68

79
interface CountDownProps {
810
className?: string
11+
timeLeftLabels: TimeLeftLabels
12+
expiredLabel: string
913
}
1014

11-
const CountDown = ({ className }: CountDownProps) => {
15+
const CountDown = ({
16+
className,
17+
timeLeftLabels,
18+
expiredLabel,
19+
}: CountDownProps) => {
1220
const [timeLeft, setTimeLeft] = useState({
1321
days: 0,
1422
hours: 0,
@@ -46,11 +54,7 @@ const CountDown = ({ className }: CountDownProps) => {
4654
}, [])
4755

4856
if (isExpired) {
49-
return (
50-
<div className="text-center text-2xl font-bold">
51-
Ethereum is 10 years old! 🚀
52-
</div>
53-
)
57+
return <div className="text-center text-2xl font-bold">{expiredLabel}</div>
5458
}
5559

5660
return (
@@ -64,7 +68,11 @@ const CountDown = ({ className }: CountDownProps) => {
6468
<div className="font-mono text-4xl font-bold text-accent-a">
6569
{timeLeft.days}
6670
</div>
67-
<div className="font-mono text-xs text-accent-a">days</div>
71+
<div className="font-mono text-xs text-accent-a">
72+
{timeLeft.days === 1
73+
? timeLeftLabels.days.singular
74+
: timeLeftLabels.days.plural}
75+
</div>
6876
</div>
6977
<div
7078
className={cn(
@@ -75,7 +83,11 @@ const CountDown = ({ className }: CountDownProps) => {
7583
<div className="font-mono text-4xl font-bold text-accent-a">
7684
{timeLeft.hours}
7785
</div>
78-
<div className="font-mono text-xs text-accent-a">hours</div>
86+
<div className="font-mono text-xs text-accent-a">
87+
{timeLeft.hours === 1
88+
? timeLeftLabels.hours.singular
89+
: timeLeftLabels.hours.plural}
90+
</div>
7991
</div>
8092
<div
8193
className={cn(
@@ -86,7 +98,11 @@ const CountDown = ({ className }: CountDownProps) => {
8698
<div className="font-mono text-4xl font-bold text-accent-a">
8799
{timeLeft.minutes}
88100
</div>
89-
<div className="font-mono text-xs text-accent-a">minutes</div>
101+
<div className="font-mono text-xs text-accent-a">
102+
{timeLeft.minutes === 1
103+
? timeLeftLabels.minutes.singular
104+
: timeLeftLabels.minutes.plural}
105+
</div>
90106
</div>
91107
<div
92108
className={cn(
@@ -97,7 +113,11 @@ const CountDown = ({ className }: CountDownProps) => {
97113
<div className="font-mono text-4xl font-bold text-accent-a">
98114
{timeLeft.seconds}
99115
</div>
100-
<div className="font-mono text-xs text-accent-a">seconds</div>
116+
<div className="font-mono text-xs text-accent-a">
117+
{timeLeft.seconds === 1
118+
? timeLeftLabels.seconds.singular
119+
: timeLeftLabels.seconds.plural}
120+
</div>
101121
</div>
102122
</div>
103123
)

app/[locale]/10years/_components/InnovationSwiper.tsx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import {
1010

1111
import { innovationCards } from "./data"
1212

13+
import { useTranslation } from "@/hooks/useTranslation"
14+
1315
export default function InnovationSwiper() {
16+
const { t } = useTranslation("page-10-year-anniversary")
17+
1418
return (
1519
<div className="w-[100%]">
1620
<SwiperContainer className="mx-auto w-full max-w-[550px] xl:max-w-[700px]">
@@ -25,18 +29,23 @@ export default function InnovationSwiper() {
2529
>
2630
<Image
2731
src={card.image}
28-
alt={card.title}
32+
alt={t(`page-10-year-innovation-card-${index + 1}-title`)}
2933
className="mx-auto my-4 h-auto max-h-48 object-contain"
3034
/>
3135
<div>
32-
<h3 className="mb-4">{card.title}</h3>
33-
<p className="text-body-secondary mb-4">{card.date}</p>
34-
</div>
35-
{card.description.map((description, index) => (
36-
<p key={index} className="mb-4">
37-
{description}
36+
<h3 className="mb-4">
37+
{t(`page-10-year-innovation-card-${index + 1}-title`)}
38+
</h3>
39+
<p className="text-body-secondary mb-4">
40+
{t(`page-10-year-innovation-card-${index + 1}-date`)}
3841
</p>
39-
))}
42+
</div>
43+
<p className="mb-4">
44+
{t(`page-10-year-innovation-card-${index + 1}-description-1`)}
45+
</p>
46+
<p className="mb-4">
47+
{t(`page-10-year-innovation-card-${index + 1}-description-2`)}
48+
</p>
4049
</SwiperSlide>
4150
))}
4251
<SwiperNavigation />

0 commit comments

Comments
 (0)