feat: add content length

This commit is contained in:
Justin Sun 2023-04-03 01:07:28 +08:00
parent f5320d3b44
commit 86b482c19e
No known key found for this signature in database
GPG Key ID: B6FCB958F29B7093
2 changed files with 9 additions and 1 deletions

View File

@ -15,6 +15,7 @@ export type Post = {
date: string;
link: string;
tags: string;
content_length: number;
// id_feed: string;
// lastSeen: string;
};

View File

@ -1,4 +1,8 @@
import { CalendarOutlined, UserOutlined } from '@ant-design/icons';
import {
CalendarOutlined,
EditOutlined,
UserOutlined,
} from '@ant-design/icons';
import { Card, Tag } from 'antd';
import dayjs from 'dayjs';
@ -23,6 +27,9 @@ const PostCard = ({ post }: { post: Post }) => {
<Tag icon={<CalendarOutlined />} color={PRIMARY_COLOR}>
{dayjs.unix(Number(post.date)).format('YYYY/MM/DD HH:mm:ss')}
</Tag>
<Tag icon={<EditOutlined />} color={PRIMARY_COLOR}>
{post.content_length}
</Tag>
</div>
<div className="break-words">{post.content}</div>
{post.tags && (