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:
2021-09-12 20:26:45 +01:00
parent 069407fa57
commit 42cfa1d619
8 changed files with 585 additions and 54 deletions

36
src/TestStart.js Normal file
View 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>
</>
)
}