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