Skip to content
Snippets Groups Projects
Commit 96e681de authored by [cpilkington3]'s avatar [cpilkington3]
Browse files

Made restart a prop

parent 9a921068
Branches
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ export function App() {
return (
<>
<Route exact path={'/'}>
<InvisibleMaze/>
<InvisibleMaze reset = {"Reset Maze"}/>
</Route>
</>
);
......
......@@ -17,7 +17,7 @@ import {
setButtonThree,
} from './invisibleMazeSlice.js';
export function InvisibleMaze() {
export function InvisibleMaze(props) {
const stepOne = useSelector(selectStepOne);
const stepTwo = useSelector(selectStepTwo);
const stepThree = useSelector(selectStepThree);
......@@ -82,9 +82,13 @@ export function InvisibleMaze() {
</div>
<div className={styles.controlPanel}>
<button className={styles.reset} onClick={resetMaze}>
{"Reset Maze"}
{props.reset}:&nbsp;
</button>
</div>
</main>
);
}
InvisibleMaze.propTypes = {
reset: PropTypes.string.isRequired,
};
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment