Skip to content

Commit ae2d5e6

Browse files
authored
Merge pull request #9980 from ethereum/fix-layer2-toid-scroll
fix: broken PageHero buttons on the Layer2 page
2 parents a061066 + 05f1eb1 commit ae2d5e6

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

src/components/PageHero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const PageHero: React.FC<IProps> = ({
9292
{subtitle}
9393
</Box>
9494
{buttons && (
95-
<Wrap spacing={2} overflow={"visible"}>
95+
<Wrap spacing={2} overflow="visible">
9696
{buttons.map((button, idx) => {
9797
if (isButtonLink(button)) {
9898
return (

src/pages/layer-2.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useI18next, useTranslation } from "gatsby-plugin-react-i18next"
66
import {
77
Badge,
88
Box,
9+
BoxProps,
910
Center,
1011
Divider,
1112
DividerProps,
@@ -72,20 +73,17 @@ const SectionHeading = (props: HeadingProps) => {
7273
return <Heading {...mergeProps} />
7374
}
7475

75-
const ContentBox = (
76-
props: HTMLAttributes<"div"> & {
77-
children: ReactNode
78-
isLightGrayBg?: boolean
79-
}
80-
) => (
76+
interface ContentBoxProps extends BoxProps {
77+
isLightGrayBg?: boolean
78+
}
79+
const ContentBox: React.FC<ContentBoxProps> = ({ isLightGrayBg, ...rest }) => (
8180
<Box
8281
px={8}
8382
py={12}
8483
width="full"
85-
{...(props.isLightGrayBg && { background: "layer2ContentSecondary" })}
86-
>
87-
{props.children}
88-
</Box>
84+
{...(isLightGrayBg && { background: "layer2ContentSecondary" })}
85+
{...rest}
86+
/>
8987
)
9088

9189
const StyledInfoIcon = () => (

0 commit comments

Comments
 (0)