Skip to content

Commit 1d2dbd5

Browse files
authored
Merge pull request #168 from wafflestudio/166-bug-deploy
포스트 작성 모달에서 유저명, 프로필 사진 하드코딩 문제 해결
2 parents f7deb37 + d9ec9cd commit 1d2dbd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/features/create-post/ui/CreateModal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useCallback } from 'react'
22

3+
import { useCurrentUser } from '@/shared/auth/useCurrentUser'
34
import { Dialog, DialogContent } from '@/shared/ui/dialog'
45
import { Dropzone } from '@/shared/ui/dropzone'
56
import { toast } from 'sonner'
@@ -32,6 +33,8 @@ export function CreateModal({ open, onOpenChange }: CreateModalProps) {
3233
function CreateModalInner({
3334
onOpenChange,
3435
}: Pick<CreateModalProps, 'onOpenChange'>) {
36+
const { data: currentUser } = useCurrentUser()
37+
3538
const {
3639
files,
3740
step,
@@ -176,7 +179,8 @@ function CreateModalInner({
176179

177180
<div className="min-h-0 flex-1 sm:w-[340px] sm:shrink-0">
178181
<PostDetailsPane
179-
profileName="user1"
182+
profileName={currentUser?.nickname ?? ''}
183+
profileImageUrl={currentUser?.profileImageUrl ?? undefined}
180184
caption={caption}
181185
onCaptionChange={setCaption}
182186
selectedAlbumId={selectedAlbumId}

0 commit comments

Comments
 (0)