Skip to content

Commit

Permalink
style: socketListener 코드 포맷팅팅
Browse files Browse the repository at this point in the history
  • Loading branch information
ijun17 committed Dec 25, 2024
1 parent b9338f8 commit bad7250
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions FE/src/features/game/data/socketListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import { getEmojiByUUID } from '../utils/emoji';

// chat
socketService.on('chatMessage', (data) => {
if(Array.isArray(data)){
data.forEach((e)=>{
if (Array.isArray(data)) {
data.forEach((e) => {
useChatStore.getState().addMessage(e);
})
}else{
});
} else {
useChatStore.getState().addMessage(data);
}
});
Expand All @@ -40,11 +40,11 @@ socketService.on('joinRoom', (data) => {
});

socketService.on('updatePosition', (data) => {
if(Array.isArray(data)){
data.forEach((e)=>{
if (Array.isArray(data)) {
data.forEach((e) => {
usePlayerStore.getState().updatePlayerPosition(e.playerId, e.playerPosition);
})
}else{
});
} else {
usePlayerStore.getState().updatePlayerPosition(data.playerId, data.playerPosition);
}
});
Expand Down

0 comments on commit bad7250

Please sign in to comment.