From 2fb0ca06dccffc3b36fa5abc33af6bae7a82a1eb Mon Sep 17 00:00:00 2001 From: Dang Date: Fri, 21 Feb 2025 14:45:50 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9A=A9=EC=96=B4=EC=A7=91=20=EA=B8=B0?= =?UTF-8?q?=EB=B3=B8=ED=94=84=EB=A1=9C=ED=95=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/wordDict/DictCard.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/wordDict/DictCard.vue b/src/components/wordDict/DictCard.vue index 3eae3d7..b4bf68f 100644 --- a/src/components/wordDict/DictCard.vue +++ b/src/components/wordDict/DictCard.vue @@ -194,8 +194,11 @@ const baseUrl = $api.defaults.baseURL.replace(/api\/$/, ''); const formatDate = (dateString) => new Date(dateString).toLocaleString(); // 프로필 이미지 -const getProfileImage = (imagePath) => - imagePath ? `${baseUrl}upload/img/profile/${imagePath}` : '/img/avatars/default-Profile.jpg'; +const defaultProfile = "/img/icons/icon.png"; + +const getProfileImage = (profilePath) => { + return profilePath && profilePath.trim() ? `${baseUrl}upload/img/profile/${profilePath}` : defaultProfile; +}; // 체크 상태 변경 시 부모로 전달