mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-04-21 06:03:56 +00:00
Challenge options moved to start overlay
This commit is contained in:
parent
6cbc0cacb8
commit
77dbbc09e9
3 changed files with 8 additions and 4 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue