Skip to content

Commit 8286306

Browse files
authored
Merge pull request #173 from wafflestudio/166-bug-deploy
스토리 뷰어에서 기본 프로필 사진 표시
2 parents 62f84c6 + cd6c8fa commit 8286306

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/features/story-viewer/ui/StoryViewer.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import ReportModal from '@/components/post/ReportModal'
1717
import AccountInfoModal from '@/components/post/AccountInfoModal'
1818
import { instance } from '@/shared/api/ky'
1919
import { useCurrentUser } from '@/shared/auth/useCurrentUser'
20+
import { DefaultProfileImage } from '@/shared/ui/default-profile-image'
2021
import instagramLogo from '@/assets/instagram-black-logo.png'
2122

2223
interface StoryViewerProps {
@@ -209,11 +210,17 @@ export function StoryViewer({
209210
params={{ userId: String(viewerUser.userId) }}
210211
className={STORY_VIEWER_UI.STYLES.USER_SECTION}
211212
>
212-
<img
213-
src={viewerUser.profileImageUrl ?? ''}
214-
className={STORY_VIEWER_UI.STYLES.AVATAR}
215-
alt=""
216-
/>
213+
{viewerUser.profileImageUrl ? (
214+
<img
215+
src={viewerUser.profileImageUrl}
216+
className={STORY_VIEWER_UI.STYLES.AVATAR}
217+
alt=""
218+
/>
219+
) : (
220+
<DefaultProfileImage
221+
className={STORY_VIEWER_UI.STYLES.AVATAR}
222+
/>
223+
)}
217224
<div className={STORY_VIEWER_UI.STYLES.USER_INFO}>
218225
<span className="font-bold">{viewerUser.nickname}</span>
219226
<span className="text-[13px] font-normal opacity-60">

0 commit comments

Comments
 (0)