Skip to content

Commit 2125478

Browse files
authored
Merge pull request #9950 from ethereum/dev
Deploy v7.9.2
2 parents 50150c4 + 55b465e commit 2125478

File tree

87 files changed

+1023
-554
lines changed

Some content is hidden

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

87 files changed

+1023
-554
lines changed

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.9.0",
3+
"version": "7.9.2",
44
"description": "Website of ethereum.org",
55
"main": "index.js",
66
"repository": "git@github.com:ethereum/ethereum-org-website.git",

src/components/FeedbackWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const FixedDot: React.FC<FixedDotProps> = ({
4444
position="sticky"
4545
bottom={{ base: `${bottomOffset + 1}rem`, lg: 4 }}
4646
ms="auto"
47-
mt={{ base: "150vh", lg: "inherit" }}
47+
mt={{ lg: "inherit" }}
4848
insetEnd={4}
4949
zIndex={98} /* Below the mobile menu */
5050
display="flex"
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// Libraries
2+
import React from "react"
3+
import { Flex, Stack, Text } from "@chakra-ui/react"
4+
import { useI18next } from "gatsby-plugin-react-i18next"
5+
6+
// Components
7+
import Emoji from "../Emoji"
8+
import Link from "../Link"
9+
import Translation from "../Translation"
10+
11+
// Data
12+
import NetworkUpgradeSummaryData from "../../data/NetworkUpgradeSummaryData"
13+
14+
// Utils
15+
import { Lang } from "../../utils/languages"
16+
import { getLocaleForNumberFormat } from "../../utils/translations"
17+
18+
interface IProps {
19+
name: string
20+
}
21+
22+
const NetworkUpgradeSummary: React.FC<IProps> = ({ name }) => {
23+
const { language } = useI18next()
24+
const localeForStatsBoxNumbers = getLocaleForNumberFormat(language as Lang)
25+
const {
26+
dateTimeAsString,
27+
ethPriceInUSD,
28+
waybackLink,
29+
blockNumber,
30+
epochNumber,
31+
slotNumber,
32+
} = NetworkUpgradeSummaryData[name]
33+
const date = new Date(dateTimeAsString)
34+
const formattedDate = date.toLocaleString(language, {
35+
timeZone: "UTC",
36+
month: "short",
37+
day: "numeric",
38+
year: "numeric",
39+
hour: "numeric",
40+
minute: "numeric",
41+
second: "numeric",
42+
})
43+
const formattedUTC = `${formattedDate} +UTC`
44+
45+
const blockTypeTranslation = (translationKey, explorerUrl, number) => {
46+
return (
47+
<Flex>
48+
<Emoji fontSize="sm" mr={2} text=":bricks:" />
49+
<Translation id={translationKey} />
50+
:&nbsp;
51+
<Link to={`${explorerUrl}${number}`}>
52+
{new Intl.NumberFormat(localeForStatsBoxNumbers).format(number)}
53+
</Link>
54+
</Flex>
55+
)
56+
}
57+
58+
return (
59+
<Stack>
60+
{formattedUTC && (
61+
<Flex>
62+
<Emoji fontSize="sm" mr={2} text=":calendar:" />
63+
<Text fontFamily="monospace" m={0}>
64+
{formattedUTC}
65+
</Text>
66+
</Flex>
67+
)}
68+
{blockNumber &&
69+
blockTypeTranslation(
70+
"page-history-block-number",
71+
"https://etherscan.io/block/",
72+
blockNumber
73+
)}
74+
{epochNumber &&
75+
blockTypeTranslation(
76+
"page-history-epoch-number",
77+
"https://beaconscan.com/epoch/",
78+
epochNumber
79+
)}
80+
{slotNumber &&
81+
blockTypeTranslation(
82+
"page-history-slot-number",
83+
"https://beaconscan.com/slot/",
84+
slotNumber
85+
)}
86+
{ethPriceInUSD && (
87+
<Flex>
88+
<Emoji fontSize="sm" mr={2} text=":money_bag:" />
89+
<Translation id="page-history-eth-price" />
90+
:&nbsp;
91+
{new Intl.NumberFormat(localeForStatsBoxNumbers, {
92+
style: "currency",
93+
currency: "USD",
94+
}).format(ethPriceInUSD)}
95+
</Flex>
96+
)}
97+
{waybackLink && (
98+
<Flex>
99+
<Emoji fontSize="sm" mr={2} text=":desktop_computer:" />
100+
<Link to={waybackLink}>
101+
<Translation id="page-history-ethereum-org-wayback" />
102+
</Link>
103+
</Flex>
104+
)}
105+
</Stack>
106+
)
107+
}
108+
109+
export default NetworkUpgradeSummary

src/components/Staking/StakingProductsCardGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const getIconFromName = (
7373
dappnode: StakingDappnodeGlyphIcon,
7474
docker: DockerIcon,
7575
defaultOpenSource: DefaultOpenSourceGlyphIcon,
76-
ethpools: EthpoolGlyphIcon,
76+
ethpool: EthpoolGlyphIcon,
7777
kiln: KilnGlyphIcon,
7878
lido: LidoGlyphIcon,
7979
rocketPool: RocketPoolGlyphIcon,

src/components/Staking/StakingStatsBox.tsx

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import React, { useState, useEffect, ReactNode } from "react"
33
import { MdInfoOutline } from "react-icons/md"
44
import { useI18next } from "gatsby-plugin-react-i18next"
5-
import { Code, Flex, Icon, Spinner, VStack } from "@chakra-ui/react"
5+
import { Code, Flex, Icon, Spinner, Text, VStack } from "@chakra-ui/react"
66
// Import components
77
import Translation from "../Translation"
88
import Tooltip from "../Tooltip"
@@ -15,7 +15,6 @@ import { getLocaleForNumberFormat } from "../../utils/translations"
1515
// Constants
1616
const NA_ERROR = "n/a"
1717
const ZERO = "0"
18-
const MAX_EFFECTIVE_BALANCE = 32
1918

2019
const Cell: React.FC<{ children: ReactNode }> = ({ children }) => {
2120
return (
@@ -64,19 +63,13 @@ const Label: React.FC<{ children: ReactNode }> = ({ children }) => {
6463
}
6564

6665
// BeaconchainTooltip component
67-
const BeaconchainTooltip = ({ isEthStore }: { isEthStore?: boolean }) => (
68-
<Tooltip
69-
content={
70-
<div>
71-
<Translation id="data-provided-by" />{" "}
72-
{isEthStore ? (
73-
<Link to="https://beaconcha.in/ethstore">Beaconcha.in ETH.STORE</Link>
74-
) : (
75-
<Link to="https://beaconcha.in/">Beaconcha.in</Link>
76-
)}
77-
</div>
78-
}
79-
>
66+
interface BeaconchainTooltipProps {
67+
children: ReactNode
68+
}
69+
const BeaconchainTooltip: React.FC<BeaconchainTooltipProps> = ({
70+
children,
71+
}) => (
72+
<Tooltip content={children}>
8073
<Icon
8174
as={MdInfoOutline}
8275
color="text"
@@ -177,7 +170,13 @@ const StakingStatsBox: React.FC<IProps> = () => {
177170
)}
178171
<Label>
179172
<Translation id="page-staking-stats-box-metric-1" />
180-
<BeaconchainTooltip />
173+
<BeaconchainTooltip>
174+
<Text>
175+
<Translation id="page-staking-stats-box-metric-1-tooltip" />
176+
</Text>
177+
<Translation id="data-provided-by" />{" "}
178+
<Link to="https://beaconcha.in/">Beaconcha.in</Link>
179+
</BeaconchainTooltip>
181180
</Label>
182181
</Cell>
183182
<Cell>
@@ -190,7 +189,13 @@ const StakingStatsBox: React.FC<IProps> = () => {
190189
)}
191190
<Label>
192191
<Translation id="page-staking-stats-box-metric-2" />
193-
<BeaconchainTooltip />
192+
<BeaconchainTooltip>
193+
<Text>
194+
<Translation id="page-staking-stats-box-metric-2-tooltip" />
195+
</Text>
196+
<Translation id="data-provided-by" />{" "}
197+
<Link to="https://beaconcha.in/">Beaconcha.in</Link>
198+
</BeaconchainTooltip>
194199
</Label>
195200
</Cell>
196201
<Cell>
@@ -203,7 +208,13 @@ const StakingStatsBox: React.FC<IProps> = () => {
203208
)}
204209
<Label>
205210
<Translation id="page-staking-stats-box-metric-3" />
206-
<BeaconchainTooltip isEthStore />
211+
<BeaconchainTooltip>
212+
<Text>
213+
<Translation id="page-staking-stats-box-metric-3-tooltip" />
214+
</Text>
215+
<Translation id="data-provided-by" />{" "}
216+
<Link to="https://beaconcha.in/ethstore">Beaconcha.in</Link>
217+
</BeaconchainTooltip>
207218
</Label>
208219
</Cell>
209220
</Flex>

src/components/TitleCardList.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const TitleCardList: React.FC<IProps> = ({
5050
bg="background"
5151
boxShadow="tableBox"
5252
width="100%"
53-
margin={8}
5453
border-radius="sm"
5554
className={className}
5655
>

0 commit comments

Comments
 (0)