sdy

update data destructuring

......@@ -18,12 +18,12 @@ export default withRouter(({ location }) => {
if (roomName !== undefined) {
const { data } = useQuery(GET_ROOM_BY_NAME, { variables: { roomName } });
const {
getRoomByName: {
if (data !== undefined) {
const {
getRoomByName: { id: roomId },
},
} = data;
roomNum = Number(roomId);
} = data;
roomNum = Number(roomId);
}
}
const [createMsg] = useMutation(WHOLE_MESSAGE);
......