Overnap

폴더 구조 변경

import React, { useContext, useState } from 'react';
import { RouteComponentProps } from 'react-router';
import { Footer } from './Footer';
import { MessageResponse } from './Message';
import SocketContext from './SocketContext';
import { Footer } from '../components/common/Footer';
import type { MessageResponse } from '../components/common/types';
import SocketContext from '../SocketContext';
export const Login: React.FC<RouteComponentProps> = ({ history }) => {
const socket = useContext(SocketContext);
......
import React, { useContext, useEffect, useState } from 'react';
import { RouteComponentProps } from 'react-router';
import { MessageResponse, MessageType } from './Message';
import SocketContext from './SocketContext';
import type { MessageResponse, MessageType } from '../components/common/types';
import SocketContext from '../contexts/SocketContext';
interface Room {
uuid: string;
......@@ -15,7 +15,7 @@ export const Rooms: React.FC<RouteComponentProps> = ({ history }) => {
const [ rooms, setRooms ] = useState<Room[]>([]);
const refreshRooms = () => {
socket.emit(MessageType.ROOM_LIST_REQUEST, (response: MessageResponse<Room[]>) => {
socket.emit("room_list_request", (response: MessageResponse<Room[]>) => {
if (response.ok) {
setRooms(response.result!);
} else {
......