Challenge options moved to start overlay

This commit is contained in:
Gene Mecija 2020-02-04 01:27:10 -08:00
parent 6cbc0cacb8
commit 77dbbc09e9
3 changed files with 8 additions and 4 deletions

View file

@ -71,9 +71,9 @@ export default React.memo(function App() {
<ModePicker /> <ModePicker />
<KeyTypePicker /> <KeyTypePicker />
<WordsPerMinute /> <WordsPerMinute />
{gameMode === 'challenge' && {/* {gameMode === 'challenge' &&
<WordListPicker /> <WordListPicker />
} } */}
</div> </div>
<Legend /> <Legend />
</div> </div>

View file

@ -38,7 +38,7 @@ export default React.memo(function ChallengeMode(props) {
cleanup() cleanup()
resetFeeder() resetFeeder()
//BREAKS HERE AFTER WORDLIST IS COMPLETED // Show a card showing challenge completion stats and option to restart word list
try { alert(`Time: ${document.getElementById('gameClock').innerText}`) } try { alert(`Time: ${document.getElementById('gameClock').innerText}`) }
catch { return } catch { return }
return return

View file

@ -1,5 +1,6 @@
import React, { useContext } from "react" import React, { useContext } from "react"
import { GameClockContext } from "../contexts/gameClockContext" import { GameClockContext } from "../contexts/gameClockContext"
import WordListPicker from "./WordListPicker"
export default (function ChallengeOverlay() { export default (function ChallengeOverlay() {
@ -24,7 +25,10 @@ export default (function ChallengeOverlay() {
return ( return (
<div id="challenge-overlay"> <div id="challenge-overlay">
<div id="challengeReady" className="notify" onClick={startChallenge}>Click to Start Challenge!</div> <div id="challengeReady" className="notify">
<WordListPicker />
<button id="startChallenge" onClick={startChallenge}>Click to Start Challenge!</button>
</div>
</div> </div>
) )
}) })