Skip to content

Commit 09e02b0

Browse files
committed
fix: HubHero prop
1 parent 4a8acbd commit 09e02b0

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

src/layouts/Roadmap.tsx

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -133,66 +133,66 @@ export const RoadmapLayout: React.FC<IProps> = ({
133133
<Box position="relative">
134134
{slug === "/roadmap/" ? (
135135
<HubHero
136-
heroImgSrc={RoadmapHubHeroImage}
136+
heroImg={RoadmapHubHeroImage}
137137
header={frontmatter.title}
138138
title={""}
139139
description={frontmatter.description}
140140
/>
141141
) : (
142142
<HeroContainer>
143-
<Flex
144-
w="full"
145-
flexDirection={{ base: "column", lg: "row" }}
146-
justify="space-between"
147-
>
148-
<TitleCard>
149-
{/* TODO: Double check this slug works */}
150-
<Breadcrumbs slug={slug} mb="8" />
151-
<Title>{frontmatter.title}</Title>
152-
<OldText>{frontmatter.description}</OldText>
153-
{frontmatter?.buttons && (
154-
// FIXME: remove the `ul` override once removed the corresponding
155-
// global styles in `src/@chakra-ui/gatsby-plugin/styles.ts`
156-
<Wrap spacing={2} marginBottom={4} sx={{ ul: { m: 0 } }}>
157-
{frontmatter.buttons.map((button, idx) => {
158-
if (button?.to) {
143+
<Flex
144+
w="full"
145+
flexDirection={{ base: "column", lg: "row" }}
146+
justify="space-between"
147+
>
148+
<TitleCard>
149+
{/* TODO: Double check this slug works */}
150+
<Breadcrumbs slug={slug} mb="8" />
151+
<Title>{frontmatter.title}</Title>
152+
<OldText>{frontmatter.description}</OldText>
153+
{frontmatter?.buttons && (
154+
// FIXME: remove the `ul` override once removed the corresponding
155+
// global styles in `src/@chakra-ui/gatsby-plugin/styles.ts`
156+
<Wrap spacing={2} marginBottom={4} sx={{ ul: { m: 0 } }}>
157+
{frontmatter.buttons.map((button, idx) => {
158+
if (button?.to) {
159+
return (
160+
<WrapItem key={idx}>
161+
<ButtonLink variant={button?.variant} to={button?.to}>
162+
{button.label}
163+
</ButtonLink>
164+
</WrapItem>
165+
)
166+
}
159167
return (
160168
<WrapItem key={idx}>
161-
<ButtonLink variant={button?.variant} to={button?.to}>
162-
{button.label}
163-
</ButtonLink>
169+
<Button variant={button?.variant} toId={button?.toId}>
170+
{button?.label}
171+
</Button>
164172
</WrapItem>
165173
)
166-
}
167-
return (
168-
<WrapItem key={idx}>
169-
<Button variant={button?.variant} toId={button?.toId}>
170-
{button?.label}
171-
</Button>
172-
</WrapItem>
173-
)
174-
})}
175-
</Wrap>
176-
)}
177-
<TableOfContents
178-
position="relative"
179-
zIndex="2"
180-
items={tocItems}
181-
isMobile
182-
/>
183-
</TitleCard>
184-
<Center>
185-
<Image
186-
src={frontmatter.image}
187-
alt={frontmatter.alt ?? ""}
188-
style={{ objectFit: "contain" }}
189-
width={700}
190-
height={345}
191-
priority
192-
/>
193-
</Center>
194-
</Flex>
195-
</HeroContainer>
174+
})}
175+
</Wrap>
176+
)}
177+
<TableOfContents
178+
position="relative"
179+
zIndex="2"
180+
items={tocItems}
181+
isMobile
182+
/>
183+
</TitleCard>
184+
<Center>
185+
<Image
186+
src={frontmatter.image}
187+
alt={frontmatter.alt ?? ""}
188+
style={{ objectFit: "contain" }}
189+
width={700}
190+
height={345}
191+
priority
192+
/>
193+
</Center>
194+
</Flex>
195+
</HeroContainer>
196196
)}
197197
<Page>
198198
{/* TODO: Switch to `above="lg"` after completion of Chakra Migration */}

0 commit comments

Comments
 (0)