Skip to content

Commit

Permalink
fix(blog): remove unnecessary ArticlePreviewCard container
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulike committed Sep 8, 2024
1 parent 5dc692f commit 38c4190
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 38 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
'use client';

import {
ClockCircleOutlined,
EyeOutlined,
TagsOutlined,
} from '@ant-design/icons';
import {type Category} from '@website/classes';
import {Markdown} from '@website/react-components/csr';
import {Card, Tag} from 'antd';

import {ArticleLink} from './Component/ArticleLink';
Expand All @@ -16,18 +19,18 @@ interface IProps {
articleTime: Readonly<Date>;
articleCategory: Readonly<Category> | undefined;
articleViewAmount: number;
articleBriefTextHtml: string;
articleBriefTextMarkdown: string;
}

export function ArticlePreviewCardView(props: IProps) {
export function ArticlePreviewCard(props: IProps) {
const {
loading,
articleId,
articleTitle,
articleTime,
articleCategory,
articleViewAmount,
articleBriefTextHtml,
articleBriefTextMarkdown,
} = props;
return (
<Card
Expand Down Expand Up @@ -66,10 +69,9 @@ export function ArticlePreviewCardView(props: IProps) {
bordered={false}
>
<div className={Style.briefContainer}>
<div
className={Style.brief}
dangerouslySetInnerHTML={{__html: articleBriefTextHtml}}
/>
<div className={Style.brief}>
<Markdown>{articleBriefTextMarkdown}</Markdown>
</div>
</div>
<ArticleLink articleId={articleId}>
<>继续阅读 {'>'}</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './Container';
export * from './View';
1 change: 1 addition & 0 deletions apps/blog/src/components/ArticleList/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export function ArticleListView(props: Props) {
return (
<Item key={id}>
<ArticlePreviewCard
loading={false}
articleId={id}
articleTitle={title}
articleTime={time}
Expand Down

0 comments on commit 38c4190

Please sign in to comment.