Showing
1 changed file
with
3 additions
and
3 deletions
... | @@ -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 | ... | ... |
-
Please register or login to post a comment