1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-05 20:15:31 -04:00

refactor: simplify next link component usage

This commit is contained in:
2026-01-28 12:40:59 -05:00
parent 0d6e489cc8
commit 29487e6d5f
21 changed files with 221 additions and 182 deletions
+16
View File
@@ -0,0 +1,16 @@
import { env } from "@/lib/env";
import { getCommentCounts } from "@/lib/server/comments";
const CommentCount = async ({ slug }: { slug: string }) => {
const count = await getCommentCounts(slug);
return (
<span
title={`${Intl.NumberFormat(env.NEXT_PUBLIC_SITE_LOCALE).format(count)} ${count === 1 ? "comment" : "comments"}`}
>
{Intl.NumberFormat(env.NEXT_PUBLIC_SITE_LOCALE).format(count)}
</span>
);
};
export default CommentCount;