Skip to content

Commit a7b456b

Browse files
authored
Merge pull request #168 from ethereum/gas-page
feat: Gas page
2 parents 428894e + d0c9aa9 commit a7b456b

File tree

3 files changed

+471
-21
lines changed

3 files changed

+471
-21
lines changed

src/components/PageHero.tsx

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import type { ReactNode } from "react"
2-
import {
3-
Box,
4-
Flex,
5-
Heading,
6-
Wrap,
7-
WrapItem,
8-
} from "@chakra-ui/react"
2+
import { Box, Center, Flex, Heading, Wrap, WrapItem } from "@chakra-ui/react"
93

104
import {
115
Button,
@@ -151,22 +145,24 @@ const PageHero = ({
151145
)}
152146
{children}
153147
</Box>
154-
<Image
155-
src={image}
148+
<Center
156149
flex="1 1 50%"
157-
alignSelf="center"
150+
maxWidth={{ base: "560px", lg: "624px" }}
158151
mt={{ base: 0, lg: 12 }}
159152
ms={{ base: 0, lg: 12 }}
160-
maxWidth={{ base: "560px", lg: "624px" }}
161-
sizes="100%"
162-
style={{
163-
width: "100%",
164-
height: "auto",
165-
objectFit: "contain",
166-
}}
167-
alt={alt}
168-
priority
169-
/>
153+
>
154+
<Image
155+
src={image}
156+
sizes="100%"
157+
style={{
158+
width: "100%",
159+
height: "auto",
160+
objectFit: "contain",
161+
}}
162+
alt={alt}
163+
priority
164+
/>
165+
</Center>
170166
</Flex>
171167
</Box>
172168
)

src/lib/utils/translations.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ const getRequiredNamespacesForPath = (path: string) => {
8383
}
8484

8585
if (path.startsWith("/developers/local-environment")) {
86-
requiredNamespaces = [...requiredNamespaces, "page-developers-local-environment"]
86+
requiredNamespaces = [
87+
...requiredNamespaces,
88+
"page-developers-local-environment",
89+
]
8790
}
8891

8992
if (path.startsWith("/developers/learning-tools")) {
@@ -110,6 +113,10 @@ const getRequiredNamespacesForPath = (path: string) => {
110113
requiredNamespaces = [...requiredNamespaces, "page-languages"]
111114
}
112115

116+
if (path.startsWith("/gas")) {
117+
requiredNamespaces = [...requiredNamespaces, "page-gas", "page-community"]
118+
}
119+
113120
// Quizzes
114121
// Note: Add any URL paths that have quizzes here
115122
if (

0 commit comments

Comments
 (0)