File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const BoardWrapper = (props) => {
11
11
const [ currAction , setCurrAction ] = useState ( "" ) ;
12
12
const timerRef = useRef ( ) ;
13
13
const boardCover = useRef ( ) ;
14
- let displayCover = props . G . gamemode === "p" ;
14
+ let [ displayCover , setDisplayCover ] = useState ( props . G . gamemode === "p" ) ;
15
15
16
16
const additionalProps = {
17
17
currAction,
@@ -21,7 +21,7 @@ export const BoardWrapper = (props) => {
21
21
22
22
// For puzzle mode, is first covered by a black cover that we must click to reveal it
23
23
const hideCover = ( ) => {
24
- displayCover = false ;
24
+ setDisplayCover ( false ) ;
25
25
timerRef . current ?. startTimer ( ) ;
26
26
} ;
27
27
@@ -32,11 +32,11 @@ export const BoardWrapper = (props) => {
32
32
< Timer ref = { timerRef } />
33
33
< div id = "board-container" >
34
34
< Board />
35
- { displayCover ? (
35
+ { displayCover && (
36
36
< div ref = { boardCover } id = "board-cover" onClick = { hideCover } >
37
37
< p > Click to start puzzle!</ p >
38
38
</ div >
39
- ) : null }
39
+ ) }
40
40
</ div >
41
41
< ActionBar />
42
42
</ div >
You can’t perform that action at this time.
0 commit comments