diff --git a/src/components/PostCard.tsx b/src/components/PostCard.tsx index 81fac5f..a760938 100644 --- a/src/components/PostCard.tsx +++ b/src/components/PostCard.tsx @@ -10,6 +10,7 @@ import { useLocation } from 'react-router-dom'; import type { Post } from '../api/types'; import { PRIMARY_COLOR } from '../constant'; +// TODO: 不知道咋把 post.author.slice(1) 插进 HTML,暂时把 span 去掉 const PostCard = ({ post }: { post: Post }) => { const location = useLocation(); const params = new URLSearchParams(location.search); @@ -18,13 +19,23 @@ const PostCard = ({ post }: { post: Post }) => { } className="w-full" - extra={查看原文} + extra={ + <> + + 查看快照 + + 查看原文 + + } >
{post.author && ( } color={PRIMARY_COLOR}> - {post.author.slice(1)} + {post.author.slice(1).replace(/<\/?span[^>]*>/g, '')} )} } color={PRIMARY_COLOR}>