* chore: bump the dependencies. * feat: define the actions for all the rest requests. * feat: use action to perform requests.
20 lines
473 B
Plaintext
20 lines
473 B
Plaintext
---
|
|
import { queryLikesAndViews } from '@/helpers/db/query';
|
|
|
|
interface Props {
|
|
permalink: string;
|
|
}
|
|
|
|
const { permalink } = Astro.props;
|
|
const [likes, view] = await queryLikesAndViews(permalink);
|
|
---
|
|
|
|
<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>
|