diff --git a/src/components/FloatingChatting.tsx b/src/components/FloatingChatting.tsx index 8f20cdc569..8388f44eac 100644 --- a/src/components/FloatingChatting.tsx +++ b/src/components/FloatingChatting.tsx @@ -158,7 +158,7 @@ function FloatingChattingBox() { const initializeChat = async () => { try { const stomp = new Client({ - brokerURL: `ws://ec2-54-180-133-123.ap-northeast-2.compute.amazonaws.com:8080/ws`, + brokerURL: `${process.env.NEXT_PUBLIC_CHAT_API_URL}`, connectHeaders: { Authorization: `Bearer ${auth?.accessToken}`, }, diff --git a/src/components/chat/ChattingRoom.tsx b/src/components/chat/ChattingRoom.tsx index 70c983ef3b..0f47d8ac00 100644 --- a/src/components/chat/ChattingRoom.tsx +++ b/src/components/chat/ChattingRoom.tsx @@ -217,7 +217,7 @@ export function ChattingRoom({ const initializeChat = async () => { try { const stomp = new Client({ - brokerURL: `ws://ec2-54-180-133-123.ap-northeast-2.compute.amazonaws.com:8080/ws`, + brokerURL: `${process.env.NEXT_PUBLIC_CHAT_API_URL}`, connectHeaders: { Authorization: `Bearer ${auth?.accessToken}`, }, diff --git a/src/components/chat/MobileChattingBox.tsx b/src/components/chat/MobileChattingBox.tsx index 007bb50de1..1710813e7f 100644 --- a/src/components/chat/MobileChattingBox.tsx +++ b/src/components/chat/MobileChattingBox.tsx @@ -121,7 +121,7 @@ export function MobileChattingBox() { const initializeChat = async () => { try { const stomp = new Client({ - brokerURL: `ws://ec2-54-180-133-123.ap-northeast-2.compute.amazonaws.com:8080/ws`, + brokerURL: `${process.env.NEXT_PUBLIC_CHAT_API_URL}`, connectHeaders: { Authorization: `Bearer ${auth?.accessToken}`, }, diff --git a/src/components/chat/MobileChattingRoom.tsx b/src/components/chat/MobileChattingRoom.tsx index be2d7a7d49..28f5a73de4 100644 --- a/src/components/chat/MobileChattingRoom.tsx +++ b/src/components/chat/MobileChattingRoom.tsx @@ -213,7 +213,7 @@ export function MobileChattingRoom({ const initializeChat = async () => { try { const stomp = new Client({ - brokerURL: `ws://ec2-54-180-133-123.ap-northeast-2.compute.amazonaws.com:8080/ws`, + brokerURL: `${process.env.NEXT_PUBLIC_CHAT_API_URL}`, connectHeaders: { Authorization: `Bearer ${auth?.accessToken}`, }, @@ -263,7 +263,7 @@ export function MobileChattingRoom({ stompClient.publish({ destination, body: JSON.stringify({ - roomId: roomId, + roomId, sender: user, message: inputMessage, nickname: userName,