mirror of
https://github.com/saveweb/saveweb-search-frontend.git
synced 2024-09-19 11:15:31 -07:00
feat: add content length
This commit is contained in:
parent
f5320d3b44
commit
86b482c19e
@ -15,6 +15,7 @@ export type Post = {
|
||||
date: string;
|
||||
link: string;
|
||||
tags: string;
|
||||
content_length: number;
|
||||
// id_feed: string;
|
||||
// lastSeen: string;
|
||||
};
|
||||
|
@ -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 && (
|
||||
|
Loading…
Reference in New Issue
Block a user