Skip to content

Commit

Permalink
fix: Use slug instead of path for homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Nov 28, 2021
1 parent 83718eb commit e28311e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,16 @@ const IndexPage = ({ data, pageContext, location }) => {
<section className={styles.section}>
<h2 className={styles.guideListingHeading}>Get inspired</h2>
<GuideListing.List className={styles.allGuidesListing}>
{guides.map(({ frontmatter }, index) => (
{guides.map(({ fields, frontmatter }, index) => (
<GuideTile
to={frontmatter.path}
to={fields.slug}
key={index}
duration={frontmatter.duration}
title={frontmatter.tileShorthand?.title || frontmatter.title}
description={
frontmatter.tileShorthand?.description ||
frontmatter.description
}
path={frontmatter.path}
/>
))}
</GuideListing.List>
Expand Down Expand Up @@ -259,11 +258,13 @@ export const pageQuery = graphql`
sort: { fields: [frontmatter___promote, frontmatter___title] }
) {
nodes {
fields {
slug
}
frontmatter {
title
description
duration
path
tileShorthand {
title
description
Expand Down

0 comments on commit e28311e

Please sign in to comment.