frontpage/components/Blog/Card.tsx

21 lines
625 B
TypeScript
Raw Normal View History

2022-09-30 19:23:14 +02:00
import type { NextPage } from "next";
2022-10-07 23:03:39 +02:00
import Link from "next/link";
2022-09-30 19:23:14 +02:00
import styles from "../../styles/Blog/Card.module.scss";
2022-10-07 23:03:39 +02:00
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>;
2022-09-30 19:23:14 +02:00
};
2022-10-07 23:03:39 +02:00
export default ContentCard;