Skip to content

Commit

Permalink
chore: Update guide tile to utilize callout frontmtter
Browse files Browse the repository at this point in the history
  • Loading branch information
timglaser committed Jun 24, 2020
1 parent b05cf61 commit e6db007
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/templates/OverviewTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@ const OverviewTemplate = ({ data }) => {
Guides to build New Relic apps ({guides?.nodes.length})
</GuideListing.Heading>
<GuideListing.List>
{guides?.nodes.map((guide, index) => (
<GuideTile key={index} {...guide?.frontmatter} />
{guides?.nodes.map(({ frontmatter }, index) => (
<GuideTile
key={index}
duration={frontmatter.duration}
title={frontmatter.callout?.title || frontmatter.title}
description={
frontmatter.callout?.description || frontmatter.description
}
path={frontmatter.path}
/>
))}
</GuideListing.List>
</GuideListing>
Expand Down Expand Up @@ -64,6 +72,10 @@ export const pageQuery = graphql`
title
description
duration
callout {
title
description
}
}
}
}
Expand Down

0 comments on commit e6db007

Please sign in to comment.