Skip to content

Commit e168f0b

Browse files
refactor(ContentHero): allow for no rendering of CTA buttons
1 parent e5eaa91 commit e168f0b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/components/Hero/ContentHero/index.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ const ContentHero = (props: ContentHeroProps) => {
3535
{title}
3636
</Heading>
3737
<Text fontSize="lg">{description}</Text>
38-
<HStack spacing="4">
39-
{buttons!.map((button, idx) => {
40-
if (!button) return
41-
return <CallToAction key={idx} {...button} />
42-
})}
43-
</HStack>
38+
{buttons && (
39+
<HStack spacing="4">
40+
{buttons.map((button, idx) => {
41+
if (!button) return
42+
return <CallToAction key={idx} {...button} />
43+
})}
44+
</HStack>
45+
)}
4446
</Stack>
4547
{/* TODO:
4648
* Add conditional Big Stat box here

0 commit comments

Comments
 (0)