rename(doc-item): post als doc umbenennen
This commit is contained in:
parent
7f01597ea1
commit
8ad250f227
@ -35,19 +35,19 @@ export type IDocItem = {
|
||||
|
||||
export function DocItem({
|
||||
sx,
|
||||
post,
|
||||
doc,
|
||||
long,
|
||||
large,
|
||||
...other
|
||||
}: CardProps & {
|
||||
post: IDocItem;
|
||||
doc: IDocItem;
|
||||
long: boolean;
|
||||
large: boolean;
|
||||
}) {
|
||||
const renderAvatar = (
|
||||
<Avatar
|
||||
alt={post.author.name}
|
||||
src={post.author.avatarUrl}
|
||||
alt={doc.author.name}
|
||||
src={doc.author.avatarUrl}
|
||||
sx={{
|
||||
left: 24,
|
||||
zIndex: 9,
|
||||
@ -77,7 +77,7 @@ export function DocItem({
|
||||
}),
|
||||
}}
|
||||
>
|
||||
{post.title}
|
||||
{doc.title}
|
||||
</Link>
|
||||
);
|
||||
|
||||
@ -93,9 +93,9 @@ export function DocItem({
|
||||
}}
|
||||
>
|
||||
{[
|
||||
{ number: post.totalComments, icon: 'solar:chat-round-dots-bold' },
|
||||
{ number: post.totalViews, icon: 'solar:eye-bold' },
|
||||
{ number: post.totalShares, icon: 'solar:share-bold' },
|
||||
{ number: doc.totalComments, icon: 'solar:chat-round-dots-bold' },
|
||||
{ number: doc.totalViews, icon: 'solar:eye-bold' },
|
||||
{ number: doc.totalShares, icon: 'solar:share-bold' },
|
||||
].map((info, _index) => (
|
||||
<Box
|
||||
key={_index}
|
||||
@ -117,8 +117,8 @@ export function DocItem({
|
||||
const renderCover = (
|
||||
<Box
|
||||
component="img"
|
||||
alt={post.title}
|
||||
src={post.coverUrl}
|
||||
alt={doc.title}
|
||||
src={doc.coverUrl}
|
||||
sx={{
|
||||
top: 0,
|
||||
width: 1,
|
||||
@ -142,7 +142,7 @@ export function DocItem({
|
||||
}),
|
||||
}}
|
||||
>
|
||||
{fDate(post.postedAt)}
|
||||
{fDate(doc.postedAt)}
|
||||
</Typography>
|
||||
);
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ export function DocSearchView({ posts }: Props) {
|
||||
md: large ? 6 : 3,
|
||||
}}
|
||||
>
|
||||
<DocItem post={post} long={long} large={large} />
|
||||
<DocItem doc={post} long={long} large={large} />
|
||||
</Grid>
|
||||
);
|
||||
})}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user