From dd592f3a3ed77e56e2680864cfa69bb27f93e0be Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 16 Jun 2023 22:38:46 +0100 Subject: [PATCH] fix: scroll to comment --- src/components/site/PostFooter.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/site/PostFooter.tsx b/src/components/site/PostFooter.tsx index fff5340c..8020bd64 100644 --- a/src/components/site/PostFooter.tsx +++ b/src/components/site/PostFooter.tsx @@ -14,7 +14,11 @@ const key = ["PostFooterInView"] const DynamicComment = dynamic(() => import("~/components/common/Comment"), { // TODO Skeleton - loading: () =>

Loading comments...

, + loading: () => ( +
+

Loading comments...

+
+ ), }) export const usePostFooterInView = () => { @@ -61,7 +65,13 @@ export const PostFooter = ({ page={page} /> - {(inited || isInView) && } + {inited || isInView ? ( + + ) : ( +
+

Loading comments...

+
+ )} ) }