diff --git a/components/guide/guide-grid-item.tsx b/components/guide/guide-grid-item.tsx index b0c80e09d..c6e35a41e 100644 --- a/components/guide/guide-grid-item.tsx +++ b/components/guide/guide-grid-item.tsx @@ -1,4 +1,5 @@ import { Badge, Box, Heading, Link, Text } from '@chakra-ui/react'; +import { GuideType } from '../../lib/guide'; type GuideGridItemProps = { title: string; @@ -7,6 +8,7 @@ type GuideGridItemProps = { date: string; isNew?: boolean; colorIndex?: number; + type?: GuideType['type']; }; const bgColorList = [ @@ -15,14 +17,14 @@ const bgColorList = [ ]; export function GuideGridItem(props: GuideGridItemProps) { - const { title, subtitle, date, isNew = false, colorIndex = 0, href } = props; + const { title, subtitle, date, isNew = false, colorIndex = 0, href, type } = props; return ( - + {isNew && New} - {date} + {type} Guide {title} {subtitle} diff --git a/pages/guides/[guide].tsx b/pages/guides/[guide].tsx index 77d33041f..26691f121 100644 --- a/pages/guides/[guide].tsx +++ b/pages/guides/[guide].tsx @@ -27,7 +27,7 @@ export default function Guide(props: GuideProps) { ))} @@ -53,7 +54,7 @@ export default function Guides(props: GuidesProps) { key={oldGuide.id} title={oldGuide.title} badgeText={oldGuide.isNew ? 'NEW' : ''} - subtitle={oldGuide.formattedUpdatedAt!} + subtitle={`${oldGuide?.type?.charAt(0).toUpperCase()}${oldGuide?.type?.slice(1)}`} /> ))}