2024-06-14 02:11:26 +08:00
|
|
|
---
|
|
|
|
import { queryLikesAndViews } from '@/helpers/db/query';
|
|
|
|
|
|
|
|
interface Props {
|
2024-06-22 22:45:20 +08:00
|
|
|
permalink: string;
|
2024-06-14 02:11:26 +08:00
|
|
|
}
|
|
|
|
|
2024-06-22 22:45:20 +08:00
|
|
|
const { permalink } = Astro.props;
|
|
|
|
const [likes, view] = await queryLikesAndViews(permalink);
|
2024-06-14 02:11:26 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
<div class="list-like d-inline-block">
|
|
|
|
<i class="text-md iconfont icon-eye"></i>
|
|
|
|
<span class="like-count">{view}</span>
|
|
|
|
</div>
|
|
|
|
<div class="list-like d-inline-block">
|
|
|
|
<i class="text-md iconfont icon-heart-fill"></i>
|
|
|
|
<span class="like-count">{likes}</span>
|
|
|
|
</div>
|