diff --git a/src/features/study/ui/today-study-card.tsx b/src/features/study/ui/today-study-card.tsx index 109f265e..ffc87692 100644 --- a/src/features/study/ui/today-study-card.tsx +++ b/src/features/study/ui/today-study-card.tsx @@ -1,8 +1,11 @@ 'use client'; import { useEffect, useState } from 'react'; +import UserProfileModal from '@/features/my-page/ui/user-profile-modal'; import { getStatusBadge } from '@/features/study/ui/status-badge-map'; import { getCookie } from '@/shared/tanstack-query/cookie'; +// TODO: FSD 의 import 바운더리를 넘어서 import 해야하는데, +// 해당 UI를 shared 등으로 빼던지 수정 필요 import UserAvatar from '@/shared/ui/avatar'; import StudyDoneModal from './study-done-modal'; import StudyReadyModal from './study-ready-modal'; @@ -22,6 +25,18 @@ export default function TodayStudyCard({ studyDate }: { studyDate: string }) { const isInterviewee = memberId === todayStudyData.intervieweeId; + const matchedUserId = isInterviewee + ? todayStudyData.interviewerId + : todayStudyData.intervieweeId; + + const matchedUserImage = isInterviewee + ? todayStudyData.interviewerImage + : todayStudyData.intervieweeImage; + + const matchedUsername = isInterviewee + ? todayStudyData.interviewerName + : todayStudyData.intervieweeName; + return (
@@ -35,26 +50,26 @@ export default function TodayStudyCard({ studyDate }: { studyDate: string }) {
- - - - - {todayStudyData.interviewerName} - -
- } - /> - - + + {`${todayStudyData.studySpaceId} 조`} + + + + + + {matchedUsername} + + + } + /> + + {todayStudyData.subject} + + {getStatusBadge(todayStudyData.progressStatus ?? 'PENDING')} +
@@ -66,15 +81,15 @@ export default function TodayStudyCard({ studyDate }: { studyDate: string }) { function InfoBox({ label, - value, + children, }: { label: string; - value: React.ReactNode; + children: React.ReactNode; }) { return (
{label} - {value} + {children}
); } diff --git a/src/shared/ui/avatar/index.tsx b/src/shared/ui/avatar/index.tsx index 59648e3c..3f8817bc 100644 --- a/src/shared/ui/avatar/index.tsx +++ b/src/shared/ui/avatar/index.tsx @@ -10,11 +10,13 @@ interface UserAvatarProps { export default function UserAvatar({ image, - alt = 'user image', + alt = 'user profile', size = 32, -}: UserAvatarProps) { + ref, + ...props +}: React.RefAttributes & UserAvatarProps) { return ( - + {image ? ( ) : ( diff --git a/src/shared/ui/modal/index.tsx b/src/shared/ui/modal/index.tsx index 262a2504..c579eff8 100644 --- a/src/shared/ui/modal/index.tsx +++ b/src/shared/ui/modal/index.tsx @@ -11,6 +11,7 @@ import { DialogOverlay, DialogPortal, DialogTitle, + DialogDescription, } from '@/shared/shadcn/ui/dialog'; function ModalRoot({ @@ -71,9 +72,11 @@ function ModalOverlay({ function ModalContent({ className, children, + description = '', ...props }: React.ComponentProps & { size?: 'small' | 'medium' | 'large'; + description?: string; }) { const { size = 'small', ...rest } = props; @@ -104,6 +107,7 @@ function ModalContent({ {...rest} >
{children}
+ {description} ); }