Skip to content

Commit 2fb6425

Browse files
committed
query hero hub image instead of using md data
1 parent 6f246de commit 2fb6425

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/templates/roadmap.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const components = {
144144
}
145145

146146
const RoadmapPage = ({
147-
data: { pageData: mdx },
147+
data: { pageData: mdx, heroImage },
148148
location,
149149
}: PageProps<Queries.RoadmapPageQuery, Context>) => {
150150
// TODO: Replace with direct token implementation after UI migration is completed
@@ -221,7 +221,7 @@ const RoadmapPage = ({
221221
<Box position="relative">
222222
{parsedPathname === "roadmap" ? (
223223
<HubHero
224-
heroImgSrc={getImage(mdx.frontmatter.image)!}
224+
heroImgSrc={getImage(heroImage)!}
225225
header={mdx.frontmatter.title}
226226
title={""}
227227
description={mdx.frontmatter.description}
@@ -324,6 +324,16 @@ export const roadmapPageQuery = graphql`
324324
}
325325
}
326326
}
327+
heroImage: file(relativePath: { eq: "heroes/roadmap-hub-hero.jpg" }) {
328+
childImageSharp {
329+
gatsbyImageData(
330+
width: 1504
331+
layout: CONSTRAINED
332+
placeholder: BLURRED
333+
quality: 100
334+
)
335+
}
336+
}
327337
pageData: mdx(fields: { relativePath: { eq: $relativePath } }) {
328338
fields {
329339
slug

0 commit comments

Comments
 (0)