feat: 실시간 채팅 UI (STOMP 연동)

- ChatDialog: 히스토리 로드 + 실시간 송수신, 내 메시지 우측 정렬, 연결상태 표시
- lib/chatSocket: STOMP 클라이언트(브로커 ws, Bearer 인증, 자동 재연결)
- api/chat 히스토리, HomePage 스팟 채팅 버튼
- @stomp/stompjs 의존성 추가

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
sb
2026-07-11 09:18:23 +09:00
parent d2e5495619
commit 9e4d1aa2af
6 changed files with 251 additions and 11 deletions
+14
View File
@@ -0,0 +1,14 @@
import { http } from './http'
export interface ChatMessage {
id: number
spotId: number
senderId: number
senderNickname: string
content: string
createdAt: string
}
export const chatApi = {
history: (spotId: number) => http.get<ChatMessage[]>(`/api/chat/spots/${spotId}/messages`),
}