Refactor guide links and id

This commit is contained in:
Kamran Ahmed
2021-09-03 16:27:30 +02:00
parent e800e3b6ce
commit 96e02195a9
5 changed files with 6 additions and 58 deletions

View File

@@ -31,8 +31,8 @@ export default function Guides(props: GuidesProps) {
<SimpleGrid columns={[1, 1, 2]} mb='30px' spacing={['10px', '10px', '15px']}>
{recentGuides.map((recentGuide, counter) => (
<GuideGridItem
href={recentGuide.url}
key={recentGuide.id}
href={`/guides/${recentGuide.id}`}
title={recentGuide.title}
subtitle={recentGuide.description}
date={recentGuide.formattedUpdatedAt!}
@@ -45,7 +45,7 @@ export default function Guides(props: GuidesProps) {
<LinksList>
{oldGuides.map(oldGuide => (
<LinksListItem
href={oldGuide.url}
href={`/guides/${oldGuide.id}`}
key={oldGuide.id}
title={oldGuide.title}
badgeText={oldGuide.isPro ? 'PRO' : ''}