diff --git a/apps/web/src/app/community/[boardCode]/[postId]/CommentSection.tsx b/apps/web/src/app/community/[boardCode]/[postId]/CommentSection.tsx index 27c42115..f9e66653 100644 --- a/apps/web/src/app/community/[boardCode]/[postId]/CommentSection.tsx +++ b/apps/web/src/app/community/[boardCode]/[postId]/CommentSection.tsx @@ -5,6 +5,7 @@ import { useState } from "react"; import { useDeleteComment } from "@/apis/community"; import Dropdown from "@/components/ui/Dropdown"; import Image from "@/components/ui/FallbackImage"; +import { DEFAULT_PROFILE_IMAGE } from "@/constants/profile"; import { IconMoreVertFilled, IconSubComment } from "@/public/svgs"; import type { Comment as CommentType, CommunityUser } from "@/types/community"; import { convertISODateToDateTime } from "@/utils/datetimeUtils"; @@ -137,9 +138,7 @@ const CommentProfile = ({ user }: { user: CommunityUser }) => {
alt { src={ post.postFindSiteUserResponse.profileImageUrl ? convertUploadedImageUrl(post.postFindSiteUserResponse.profileImageUrl) - : "/images/placeholder/profile64.svg" + : DEFAULT_PROFILE_IMAGE } width={40} height={40} diff --git a/apps/web/src/components/ui/ProfileWithBadge.tsx b/apps/web/src/components/ui/ProfileWithBadge.tsx index e92c2b39..ae2043e4 100644 --- a/apps/web/src/components/ui/ProfileWithBadge.tsx +++ b/apps/web/src/components/ui/ProfileWithBadge.tsx @@ -1,5 +1,6 @@ import Image from "@/components/ui/FallbackImage"; -import { IconDefaultProfile, IconGraduation } from "@/public/svgs/mentor"; +import { DEFAULT_PROFILE_IMAGE } from "@/constants/profile"; +import { IconGraduation } from "@/public/svgs/mentor"; interface ProfileWithBadgeProps { profileImageUrl?: string | null; @@ -28,20 +29,16 @@ const ProfileWithBadge = ({ hasBadge ? "border-2 border-primary-1" : "border border-gray-200" }`} > - {profileImageUrl ? ( - 프로필 이미지 - ) : ( - - )} + 프로필 이미지
{/* 학습 상태 배지 */} diff --git a/apps/web/src/constants/profile.ts b/apps/web/src/constants/profile.ts new file mode 100644 index 00000000..761f6019 --- /dev/null +++ b/apps/web/src/constants/profile.ts @@ -0,0 +1 @@ +export const DEFAULT_PROFILE_IMAGE = "/images/placeholder/profile64.svg";