From effa67d8c57251190175facc00d721cf4e483d66 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 18 May 2023 12:51:17 +0100 Subject: [PATCH] fix: viewing statistics --- src/components/common/Comment.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/common/Comment.tsx b/src/components/common/Comment.tsx index ecd67b1e..32857495 100644 --- a/src/components/common/Comment.tsx +++ b/src/components/common/Comment.tsx @@ -7,7 +7,7 @@ import { CommentItem } from "~/components/common/CommentItem" import { useTranslation } from "~/lib/i18n/client" import { ExpandedNote } from "~/lib/types" import { cn } from "~/lib/utils" -import { useGetComments } from "~/queries/page" +import { useGetComments, useGetPage } from "~/queries/page" export const Comment: React.FC<{ page?: ExpandedNote @@ -19,6 +19,12 @@ export const Comment: React.FC<{ }) const { t } = useTranslation("common") + // For viewing statistics + useGetPage({ + characterId: page?.characterId, + noteId: page?.noteId, + }) + return (