diff --git a/apps/blog/app/[category]/[...slug]/page.tsx b/apps/blog/app/[category]/[...slug]/page.tsx index 1a9e8b87..20816ff6 100644 --- a/apps/blog/app/[category]/[...slug]/page.tsx +++ b/apps/blog/app/[category]/[...slug]/page.tsx @@ -175,7 +175,7 @@ export default async function Post({ params: { category, slug } }: PostProps) { - Loading...

}> + }> diff --git a/apps/blog/src/components/CommentAvatar/index.tsx b/apps/blog/src/components/CommentAvatar/index.tsx index 6ce2dbcd..79384847 100644 --- a/apps/blog/src/components/CommentAvatar/index.tsx +++ b/apps/blog/src/components/CommentAvatar/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { toURL } from "#utils/url"; const AVATAR_SIZE = 40; @@ -32,6 +32,10 @@ const getAvatar = (name: string, link?: string) => { function CommentAvatar({ name, url, postAuthor }: CommentAvatarProps) { const [src, setSrc] = useState(getAvatar(name, url)); + useEffect(() => { + setSrc(getAvatar(name, url)); + }, [name, url]); + if (postAuthor) { return ( +
+ +
+
+ + 댓글을 남겨주세요. (이메일 주소는 공개되지 않습니다.) + + { + setName(value); + }} + /> + + +