Skip to content

Commit 9de98fb

Browse files
authored
Merge pull request #167 from ethereum/roadmapHero
Roadmap HubHero
2 parents 94e2ac3 + 0747af0 commit 9de98fb

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

src/components/Hero/HubHero/index.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,12 @@ const HubHero = ({
6767
<Heading size="2xl">{header}</Heading>
6868
<Text size="lg">{description}</Text>
6969
</Stack>
70-
{buttons && (
71-
<HStack justify={{ md: "center", xl: "start" }} spacing="4">
72-
{buttons.map((button, idx) => {
73-
if (!button) return
74-
return <CallToAction key={idx} {...button} />
75-
})}
76-
</HStack>
77-
)}
70+
<HStack justify={{ md: "center", xl: "start" }} spacing="4">
71+
{(buttons || []).map((button, idx) => {
72+
if (!button) return
73+
return <CallToAction key={idx} {...button} />
74+
})}
75+
</HStack>
7876
</Stack>
7977
</Box>
8078
)

src/layouts/Roadmap.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Breadcrumbs from "@/components/Breadcrumbs"
1616
import { List as ButtonDropdownList } from "@/components/ButtonDropdown"
1717
import { Button, ButtonLink } from "@/components/Buttons"
1818
import FeedbackCard from "@/components/FeedbackCard"
19+
import HubHero from "@/components/Hero/HubHero"
1920
import { Image } from "@/components/Image"
2021
import LeftNavBar from "@/components/LeftNavBar"
2122
import {
@@ -31,6 +32,8 @@ import RoadmapActionCard from "@/components/Roadmap/RoadmapActionCard"
3132
import RoadmapImageContent from "@/components/Roadmap/RoadmapImageContent"
3233
import TableOfContents from "@/components/TableOfContents"
3334

35+
import RoadmapHubHeroImage from "@/public/heroes/roadmap-hub-hero.jpg"
36+
3437
const CardGrid = (props: ChildOnlyProp) => (
3538
<SimpleGrid columns={{ base: 1, md: 2 }} spacing={8} {...props} />
3639
)
@@ -128,7 +131,15 @@ export const RoadmapLayout: React.FC<IProps> = ({
128131

129132
return (
130133
<Box position="relative">
131-
<HeroContainer>
134+
{slug === "/roadmap/" ? (
135+
<HubHero
136+
heroImgSrc={RoadmapHubHeroImage}
137+
header={frontmatter.title}
138+
title={""}
139+
description={frontmatter.description}
140+
/>
141+
) : (
142+
<HeroContainer>
132143
<Flex
133144
w="full"
134145
flexDirection={{ base: "column", lg: "row" }}
@@ -182,6 +193,7 @@ export const RoadmapLayout: React.FC<IProps> = ({
182193
</Center>
183194
</Flex>
184195
</HeroContainer>
196+
)}
185197
<Page>
186198
{/* TODO: Switch to `above="lg"` after completion of Chakra Migration */}
187199
<LeftNavBar

0 commit comments

Comments
 (0)