Overnap
Builds for 1 pipeline passed in 8 minutes 4 seconds

Merge branch 'bugfix/room' into develop

...@@ -37,8 +37,6 @@ export const Chat: React.FC<ChatProps> = (props) => { ...@@ -37,8 +37,6 @@ export const Chat: React.FC<ChatProps> = (props) => {
37 37
38 const handleEnter = useCallback((e: React.KeyboardEvent) => { 38 const handleEnter = useCallback((e: React.KeyboardEvent) => {
39 if (e.key === 'Enter') { 39 if (e.key === 'Enter') {
40 - // setChatLines([...chatLines, { sender: 'me', message: input }]);
41 -
42 const rawMessage: RawMessage = { 40 const rawMessage: RawMessage = {
43 type: MessageType.ROOM_CHAT, 41 type: MessageType.ROOM_CHAT,
44 message: { message: input } 42 message: { message: input }
......
...@@ -25,8 +25,8 @@ export const Ready: React.FC<ReadyProps> = ({ users }) => { ...@@ -25,8 +25,8 @@ export const Ready: React.FC<ReadyProps> = ({ users }) => {
25 setIsAdmin(me?.admin || false); 25 setIsAdmin(me?.admin || false);
26 setIsReady(me?.ready || false); 26 setIsReady(me?.ready || false);
27 27
28 - const test = true; 28 + var test = users.length > 1;
29 - users.forEach(x => test && x.ready); 29 + users.forEach(x => test = test && (x.ready || x.admin));
30 setIsAllReady(test); 30 setIsAllReady(test);
31 }); 31 });
32 32
...@@ -47,7 +47,7 @@ export const Ready: React.FC<ReadyProps> = ({ users }) => { ...@@ -47,7 +47,7 @@ export const Ready: React.FC<ReadyProps> = ({ users }) => {
47 }, [isAdmin, isReady, isAllReady]); 47 }, [isAdmin, isReady, isAllReady]);
48 48
49 return ( 49 return (
50 - <button className={`${isAdmin ? isAllReady ? 'bg-green-500' : 'bg-gray-400' 50 + <button className={`${isAdmin ? isAllReady ? 'bg-green-500 active:bg-green-600' : 'bg-gray-400'
51 : isReady ? 'bg-green-600' 51 : isReady ? 'bg-green-600'
52 : 'bg-green-500 active:bg-green-600'} 52 : 'bg-green-500 active:bg-green-600'}
53 text-white font-bold uppercase 53 text-white font-bold uppercase
......
...@@ -34,7 +34,7 @@ export const Room: React.FC = () => { ...@@ -34,7 +34,7 @@ export const Room: React.FC = () => {
34 const data = rawMessage.message as UpdateRoomUser; 34 const data = rawMessage.message as UpdateRoomUser;
35 if (data.state == 'removed') { 35 if (data.state == 'removed') {
36 const newUsers = roomData.users; 36 const newUsers = roomData.users;
37 - const index = newUsers.indexOf(data.user); 37 + const index = newUsers.findIndex(x => x.username === data.user.username);
38 if (index < 0) { 38 if (index < 0) {
39 console.log('존재하지 않는 유저를 제거 시도'); 39 console.log('존재하지 않는 유저를 제거 시도');
40 } else { 40 } else {
......