Skip to content

Commit

Permalink
Temp comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kawtar Choubari committed Nov 1, 2023
1 parent 897876d commit bc76011
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions components/mdx/post-views.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ interface PostViewsProps {
}

export default async function PostViews({ slug }: PostViewsProps) {
const response = await fetch(
`${process.env.NEXT_PUBLIC_APP_URL}/api/views/${slug}`
);
const data = await response.json();
// const response = await fetch(
// `${process.env.NEXT_PUBLIC_APP_URL}/api/views/${slug}`
// );
// const data = await response.json();

return (
<div className="text-sm mb-2 opacity-60 flex items-center">
<FaEye className="inline-block mr-2 text-base" />
<p className="italic">
{data?.total && `${countFormatter(data.total)} views`}
0 views
{/* {data?.total && `${countFormatter(data.total)} views`} */}
</p>
</div>
);
Expand Down

0 comments on commit bc76011

Please sign in to comment.