This repository has been archived on 2025-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
parandum/src/TestStart.js
Matthew Grove 42cfa1d619 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.
2021-09-12 20:26:45 +01:00

37 lines
753 B
JavaScript

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>
</>
)
}