frontpage/components/Blog/Card.tsx
2022-10-07 23:04:20 +02:00

21 lines
625 B
TypeScript

import type { NextPage } from "next";
import Link from "next/link";
import styles from "../../styles/Blog/Card.module.scss";
interface IContentCard {
name: string;
title: string;
description: string;
type: "project" | "diary";
}
const ContentCard: NextPage<IContentCard> = (content: IContentCard) => {
return <Link href={`/blog/${content.type}/${content.name}`} passHref>
<div className={styles.card}>
<h3 className={styles.title}>{content.title}</h3>
<p className={styles.description}>{content.description}</p>
</div>
</Link>;
};
export default ContentCard;