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) => {
const handleEnter = useCallback((e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
// setChatLines([...chatLines, { sender: 'me', message: input }]);
const rawMessage: RawMessage = {
type: MessageType.ROOM_CHAT,
message: { message: input }
......
......@@ -25,8 +25,8 @@ export const Ready: React.FC<ReadyProps> = ({ users }) => {
setIsAdmin(me?.admin || false);
setIsReady(me?.ready || false);
const test = true;
users.forEach(x => test && x.ready);
var test = users.length > 1;
users.forEach(x => test = test && (x.ready || x.admin));
setIsAllReady(test);
});
......@@ -47,7 +47,7 @@ export const Ready: React.FC<ReadyProps> = ({ users }) => {
}, [isAdmin, isReady, isAllReady]);
return (
<button className={`${isAdmin ? isAllReady ? 'bg-green-500' : 'bg-gray-400'
<button className={`${isAdmin ? isAllReady ? 'bg-green-500 active:bg-green-600' : 'bg-gray-400'
: isReady ? 'bg-green-600'
: 'bg-green-500 active:bg-green-600'}
text-white font-bold uppercase
......
......@@ -34,7 +34,7 @@ export const Room: React.FC = () => {
const data = rawMessage.message as UpdateRoomUser;
if (data.state == 'removed') {
const newUsers = roomData.users;
const index = newUsers.indexOf(data.user);
const index = newUsers.findIndex(x => x.username === data.user.username);
if (index < 0) {
console.log('존재하지 않는 유저를 제거 시도');
} else {
......