platform/lms-adm-fe release promotion snapshot

This commit is contained in:
2026-07-09 06:34:54 +00:00
parent 61dd5d25e7
commit 14e0cee1a0
+3 -2
View File
@@ -222,7 +222,7 @@ function ThreadCard({ thread, onOpen }: { thread: InstructorChatThread; onOpen:
); );
} }
function StudentAvatar({ thread }: { thread: InstructorChatThread }) { function StudentAvatar({ thread, size = 'md' }: { thread: InstructorChatThread; size?: 'sm' | 'md' }) {
const [avatarFailed, setAvatarFailed] = useState(false); const [avatarFailed, setAvatarFailed] = useState(false);
useEffect(() => { useEffect(() => {
@@ -230,7 +230,7 @@ function StudentAvatar({ thread }: { thread: InstructorChatThread }) {
}, [thread.studentAvatarUrl]); }, [thread.studentAvatarUrl]);
return ( return (
<span className="grid h-10 w-10 shrink-0 place-items-center overflow-hidden rounded-full bg-[#eef2ff] text-[#4f46e5] transition group-hover:bg-[#4f46e5] group-hover:text-white"> <span className={`${size === 'sm' ? 'h-9 w-9' : 'h-10 w-10'} grid shrink-0 place-items-center overflow-hidden rounded-full bg-[#eef2ff] text-[#4f46e5] transition group-hover:bg-[#4f46e5] group-hover:text-white`}>
{thread.studentAvatarUrl && !avatarFailed ? ( {thread.studentAvatarUrl && !avatarFailed ? (
<img className="h-full w-full object-cover" src={thread.studentAvatarUrl} alt="" onError={() => setAvatarFailed(true)} /> <img className="h-full w-full object-cover" src={thread.studentAvatarUrl} alt="" onError={() => setAvatarFailed(true)} />
) : ( ) : (
@@ -291,6 +291,7 @@ function ChatRoom({
<button className="grid h-9 w-9 place-items-center rounded-md text-[#64748b] hover:bg-[#f8fafc] hover:text-[#111827]" type="button" aria-label="목록으로 돌아가기" title="목록으로 돌아가기" onClick={onBack}> <button className="grid h-9 w-9 place-items-center rounded-md text-[#64748b] hover:bg-[#f8fafc] hover:text-[#111827]" type="button" aria-label="목록으로 돌아가기" title="목록으로 돌아가기" onClick={onBack}>
<ArrowLeft size={17} aria-hidden="true" /> <ArrowLeft size={17} aria-hidden="true" />
</button> </button>
<StudentAvatar thread={thread} size="sm" />
<div className="min-w-0 flex-1"> <div className="min-w-0 flex-1">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<p className="truncate text-[15px] font-black text-[#0f172a]">{thread.studentName}</p> <p className="truncate text-[15px] font-black text-[#0f172a]">{thread.studentName}</p>