[fix] 따닥 이슈 해결 및 채팅 읽지 않은 사람 표시 추가#129
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughChatRoom.tsx에서 각 메시지의 타임스탬프 구조를 단일 요소에서 수직 flex 컨테이너로 변경하고, unreadCount 배지를 타임스탬프 위에 조건부로 렌더링하도록 수정했습니다(수신/발신 메시지 모두에 적용). useApplyToClub 훅은 내부 useMutation의 Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/pages/Chat/ChatRoom.tsx (1)
124-145: 타임스탬프 + 읽지 않음 표시 컴포넌트 추출 고려수신/발신 메시지에서 동일한 구조(unreadCount + timestamp)가 반복됩니다. 필요시 작은 컴포넌트로 추출하면 유지보수가 편해집니다.
// 예시 interface MessageMetaProps { unreadCount: number; createdAt: string; align: 'start' | 'end'; } const MessageMeta = ({ unreadCount, createdAt, align }: MessageMetaProps) => ( <div className={clsx('flex shrink-0 flex-col self-end gap-0.5', align === 'start' ? 'items-start' : 'items-end')}> {unreadCount > 0 && ( <span className="text-[10px] font-medium text-[`#4B9FE1`]">{unreadCount}</span> )} <span className="text-[10px] text-indigo-300">{formatTime(createdAt)}</span> </div> );🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/Chat/ChatRoom.tsx` around lines 124 - 145, The timestamp + unread-count markup is duplicated for incoming and outgoing messages; extract it into a small reusable component (e.g., MessageMeta) that accepts props unreadCount, createdAt, and align (or items-start/items-end) and uses formatTime(createdAt) internally; replace both duplicated blocks in ChatRoom.tsx with the new <MessageMeta ... /> invocation (referencing message.unreadCount, message.createdAt and message.isMine to choose align) so styling and logic are centralized.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/pages/Chat/ChatRoom.tsx`:
- Around line 124-129: The timestamp and unread-count font sizes are
inconsistent between incoming and outgoing messages (incoming uses text-[10px]
on message.unreadCount and formatTime, outgoing uses text-xs); update the
classes in the ChatRoom.tsx JSX (the elements rendering message.unreadCount and
formatTime for both received and sent messages) to use a single consistent
utility (e.g., change text-[10px] to text-xs or vice versa) so both branches use
the same font-size class.
---
Nitpick comments:
In `@src/pages/Chat/ChatRoom.tsx`:
- Around line 124-145: The timestamp + unread-count markup is duplicated for
incoming and outgoing messages; extract it into a small reusable component
(e.g., MessageMeta) that accepts props unreadCount, createdAt, and align (or
items-start/items-end) and uses formatTime(createdAt) internally; replace both
duplicated blocks in ChatRoom.tsx with the new <MessageMeta ... /> invocation
(referencing message.unreadCount, message.createdAt and message.isMine to choose
align) so styling and logic are centralized.
This was referenced Mar 3, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선 사항