Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강동현
/
nodejs-game
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Overnap
2021-06-10 00:09:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
917d4a7ecaaeccafe233bbe53e9054919039a0ae
917d4a7e
1 parent
53d88c2b
방장의 게임 시작 여부 검사가 잘못되던 문제 수정
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
web/src/components/room/Ready.tsx
web/src/components/room/Ready.tsx
View file @
917d4a7
...
...
@@ -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
...
...
Please
register
or
login
to post a comment