Add new lives mode and more test options!
Users can now choose from two modes - lives and questions. Lives mode will end when the user makes the chosen number of mistakes. Questions mode will end when the user answers all questions correctly from a list of questions the length of which the user chooses.
This commit is contained in:
36
src/TestStart.js
Normal file
36
src/TestStart.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import React from "react";
|
||||
import Loader from "./puff-loader.svg";
|
||||
|
||||
export default function TestStart(props) {
|
||||
return (
|
||||
<>
|
||||
<div className="overlay" onClick={props.hideTestStart}></div>
|
||||
<div className="overlay-content options-list-overlay-content">
|
||||
|
||||
{
|
||||
props.loading
|
||||
?
|
||||
<img className="button-loader" src={Loader} alt="Loading..." />
|
||||
:
|
||||
<>
|
||||
{
|
||||
// ["Classic", "Lives", "Countdown"].map((mode) =>
|
||||
["Classic", "Lives"].map((mode) =>
|
||||
<h3
|
||||
key={mode}
|
||||
onClick={() => props.showIndividualTestPrompt(mode.toLowerCase())}
|
||||
>
|
||||
{mode}
|
||||
</h3>
|
||||
)
|
||||
}
|
||||
<div onClick={props.hideTestStart}>
|
||||
Cancel
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user