1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-02-24 03:23:08 +01:00

Guides listing

This commit is contained in:
Kamran Ahmed 2021-09-02 18:08:02 +02:00
parent c097017520
commit fc159ecb9b
3 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import React from 'react';
import { Badge, Flex, Link, Text } from '@chakra-ui/react';
type LinksListItemProps = {
href: string;
title: string;
subtitle: string;
badgeText?: string;
@ -10,10 +11,11 @@ type LinksListItemProps = {
};
export function LinksListItem(props: LinksListItemProps) {
const { title, subtitle, badgeText, icon, hideSubtitleOnMobile = false } = props;
const { title, subtitle, badgeText, icon, hideSubtitleOnMobile = false, href } = props;
return (
<Link
href={href}
fontSize={['14px', '14px', '15px']}
py='9px'
d='flex'

View File

@ -20,7 +20,7 @@
"createdAt": "2020-07-01T19:59:14.191Z"
},
{
"title": "OAuth — Open Authorization",
"title": "OAuth — Open Authorization",
"description": "Learn and understand what is OAuth and how it works",
"url": "/guides/oauth",
"fileName": "oauth",

View File

@ -66,6 +66,7 @@ export default function Home(props: HomeProps) {
{guides.map(guide => (
<LinksListItem
key={guide.url}
href={guide.url}
title={guide.title}
badgeText={guide.isPro ? 'PRO' : ''}
subtitle={guide.formattedUpdatedAt}