Skip to content

Commit 24353d5

Browse files
refactor(layouts/Upgrade): apply ContentHero
1 parent 4479689 commit 24353d5

File tree

1 file changed

+26
-33
lines changed

1 file changed

+26
-33
lines changed

src/layouts/Upgrade.tsx

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import BeaconChainActions from "@/components/BeaconChainActions"
2121
import Breadcrumbs from "@/components/Breadcrumbs"
2222
import type { List as ButtonDropdownList } from "@/components/ButtonDropdown"
2323
import FeedbackCard from "@/components/FeedbackCard"
24+
import { ContentHero } from "@/components/Hero"
2425
import { Image } from "@/components/Image"
2526
import LeftNavBar from "@/components/LeftNavBar"
2627
import { BaseLink } from "@/components/Link"
@@ -121,7 +122,7 @@ const LastUpdated = (props: ChildOnlyProp) => (
121122
pt={4}
122123
mb={0}
123124
borderTop="1px"
124-
borderColor="border"
125+
borderColor="body.dark"
125126
{...props}
126127
/>
127128
)
@@ -183,38 +184,30 @@ export const UpgradeLayout = ({
183184

184185
return (
185186
<Container dir={contentNotTranslated ? "ltr" : "unset"}>
186-
<HeroContainer>
187-
<TitleCard>
188-
<Breadcrumbs slug={slug} startDepth={1} mt={2} mb="8" />
189-
<Title>{frontmatter.title}</Title>
190-
<Box>
191-
<List listStyleType="disc">
192-
{summaryPoints.map((point, idx) => (
193-
<SummaryPoint key={idx}>{point}</SummaryPoint>
194-
))}
195-
</List>
196-
</Box>
197-
{lastUpdatedDate && (
198-
<LastUpdated>
199-
{t("common:page-last-updated")}:{" "}
200-
{getLocaleTimestamp(locale as Lang, lastUpdatedDate)}
201-
</LastUpdated>
202-
)}
203-
</TitleCard>
204-
{frontmatter.image && (
205-
<Image
206-
src={frontmatter.image}
207-
blurDataURL={frontmatter.blurDataURL}
208-
alt={frontmatter.alt}
209-
width={816}
210-
height={525}
211-
style={{ objectFit: "cover" }}
212-
priority
213-
flex={{ base: "1 1 100%", md: "none" }}
214-
alignSelf={{ base: "center", md: "flex-end" }}
215-
/>
216-
)}
217-
</HeroContainer>
187+
<ContentHero
188+
breadcrumbs={{ slug, startDepth: 1 }}
189+
title={frontmatter.title}
190+
description={
191+
<>
192+
<Box>
193+
<List listStyleType="disc">
194+
{summaryPoints.map((point, idx) => (
195+
<SummaryPoint key={idx}>{point}</SummaryPoint>
196+
))}
197+
</List>
198+
</Box>
199+
{lastUpdatedDate && (
200+
<LastUpdated>
201+
{t("common:page-last-updated")}:{" "}
202+
{getLocaleTimestamp(locale as Lang, lastUpdatedDate)}
203+
</LastUpdated>
204+
)}
205+
</>
206+
}
207+
heroImg={frontmatter.image}
208+
blurDataURL={frontmatter.blurDataURL}
209+
/>
210+
218211
<MoreContent to={"#" + MAIN_CONTENT_ID}>
219212
<Icon as={MdExpandMore} fontSize="2xl" color="secondary" />
220213
</MoreContent>

0 commit comments

Comments
 (0)