-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from fac20/design-qa
Design qa
- Loading branch information
Showing
17 changed files
with
53 additions
and
187 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,27 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
body { | ||
background-image: url("https://i.dailymail.co.uk/1s/2019/01/19/00/8715018-0-image-a-32_1547857542694.jpg"); | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
.game__over { | ||
background-image: url("https://www.google.com/url?sa=i&url=https%3A%2F%2Fimgflip.com%2Ftag%2Ffunny%2Bhawk&psig=AOvVaw0xhBDXRviN0aWsvWDcdz79&ust=1600447128173000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCLj1mqvQ8OsCFQAAAAAdAAAAABAD"); | ||
} | ||
|
||
div { | ||
text-align: center; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
h1 { | ||
color: red; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
h2 { | ||
color: blue; | ||
background-color: white; | ||
} | ||
|
||
button { | ||
color: pink; | ||
background-color: green; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,26 @@ | ||
import React from "react" | ||
|
||
// correct_answer +5 | ||
// incorrect_answers -2 | ||
export default function Timer(props) { | ||
// const [timePlus, setTimePlus] = React.useState(null) | ||
// const [minusTime, setMinusTime] = React.useState(null) | ||
export default function Timer({timeLeft, setTimeLeft, setGameState}) { | ||
|
||
// const [timeLeft, setTimeLeft] = React.useState(15) | ||
|
||
React.useEffect((props) => { | ||
React.useEffect(() => { | ||
// if there is not timeLeft then game over? | ||
if (props.timeLeft <= 0) props.setGameState("gameOver"); | ||
if ( timeLeft <= 0) setGameState("gameOver"); | ||
// else create set interval function for every second | ||
const intervalId = setInterval(() => { | ||
props.setTimeLeft(props.timeLeft - 1) | ||
const startInterval = setInterval(() => { | ||
setTimeLeft(timeLeft - 1) | ||
}, 1000); | ||
return () => clearInterval(intervalId) | ||
}, [props.timeLeft]) | ||
return () => clearInterval(startInterval) | ||
}, [timeLeft, setGameState, setTimeLeft]) | ||
|
||
return ( | ||
|
||
<div> | ||
<h1>{props.timeLeft}</h1> | ||
<label for="game">progress:</label> | ||
<progress id="game" value={props.timeLeft} max="30"> {props.timeLeft} </progress> | ||
<h1>{timeLeft}</h1> | ||
<label htmlFor="game">progress:</label> | ||
<progress id="game" value={ timeLeft} max="30"> {timeLeft} </progress> | ||
|
||
</div> | ||
|
||
) | ||
|
||
} | ||
|
||
|
||
// function AlterTimer() { | ||
// const [alterTimer, setAlterTimer] = React.useState(0) | ||
|
||
// React.useEffect(() => { | ||
// if (props.correct_answer) { | ||
// setAlterTimer(timeLeft + 5) | ||
// } else { | ||
// setAlterTimer(timeLeft - 2) | ||
// } | ||
// }) | ||
// } | ||
|
||
/* | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters