diff --git a/client/src/components/buttons/StartButton.tsx b/client/src/components/buttons/StartButton.tsx
index 55b442f..4546509 100644
--- a/client/src/components/buttons/StartButton.tsx
+++ b/client/src/components/buttons/StartButton.tsx
@@ -9,7 +9,6 @@ export type StartButtonProps = {
export default function StartButton() {
const { socketRef, isHost, roomInfo, problems, duration } = useRoom();
- // TODO: 이거 내일 얘기해보고 Provider로 옮길 수 있음, 내 생각에 이 로직은 setRoomInfo쪽으로 들어가는게 맞는 것 같음
const start = () => {
console.log('start');
@@ -36,25 +35,30 @@ export default function StartButton() {
const socket = socketRef.current;
socket?.emit('game-start', roomInfo);
};
+
return (
-
);
}
diff --git a/client/src/contexts/RoomProvider.tsx b/client/src/contexts/RoomProvider.tsx
index 55ca97f..078381b 100644
--- a/client/src/contexts/RoomProvider.tsx
+++ b/client/src/contexts/RoomProvider.tsx
@@ -62,7 +62,7 @@ export const RoomProvider: React.FC = ({ children }) => {
socketRef.current = socket;
- socket.on('room-info', (newRoomInfo) => {
+ socket.on('room-info', (newRoomInfo: RoomInfoType) => {
setRoomInfo(newRoomInfo);
if (newRoomInfo.problems && newRoomInfo.problems.length > 0) {