---
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>