This commit is contained in:
@@ -4,16 +4,15 @@ import { Post, getAllBlogsFrontMatter } from "../../utils/markdown";
|
||||
import { FrontMatter } from "../../types/types";
|
||||
import Link from "next/link";
|
||||
import { formatDate } from "../../utils/general";
|
||||
import { BasicArticleProps } from "../../components/PostHeader";
|
||||
|
||||
export interface BasicBlogProps extends FrontMatter {
|
||||
title: string;
|
||||
description: string;
|
||||
date: string;
|
||||
author: string;
|
||||
authorLink: string;
|
||||
}
|
||||
|
||||
const BlogCard = ({ blog, slug }: { blog: BasicBlogProps; slug: string }) => {
|
||||
const BlogCard = ({
|
||||
blog,
|
||||
slug,
|
||||
}: {
|
||||
blog: BasicArticleProps;
|
||||
slug: string;
|
||||
}) => {
|
||||
return (
|
||||
<div className="p-4 rounded-md border border-gray-700">
|
||||
<div className="text-sm font-medium text-gray-500">
|
||||
@@ -39,7 +38,7 @@ const Blog = ({ posts }: { posts: Post[] }) => {
|
||||
{posts.map((post, index) => (
|
||||
<BlogCard
|
||||
key={index}
|
||||
blog={post.frontMatter as BasicBlogProps}
|
||||
blog={post.frontMatter as BasicArticleProps}
|
||||
slug={post.slug}
|
||||
/>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user