-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4d8afd
commit 207deb3
Showing
2 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
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,12 +1,18 @@ | ||
import Player from './components/Player.jsx'; | ||
import Player from "./components/Player.jsx"; | ||
import TimerChallenge from "./components/TimerChallenge.jsx"; | ||
|
||
function App() { | ||
return ( | ||
<> | ||
<Player /> | ||
<div id="challenges"></div> | ||
</> | ||
); | ||
return ( | ||
<> | ||
<Player /> | ||
<div id="challenges"> | ||
<TimerChallenge title="easy" targetTime={1} /> | ||
<TimerChallenge title="not easy" targetTime={5} /> | ||
<TimerChallenge title="getting tough" targetTime={10} />{" "} | ||
<TimerChallenge title="pros only" targetTime={15} /> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export default function TimerChallenge({ title, targetTime }) { | ||
function handleStart() { | ||
setTimeout(() => {}, targetTime * 1000); | ||
} | ||
return ( | ||
<section className="challenge"> | ||
<h2>{title}</h2> | ||
<p className="challenge-time"> | ||
{targetTime} second{targetTime > 1 ? "s" : ""} | ||
</p> | ||
<p> | ||
{" "} | ||
<button>Start Challenge</button> | ||
</p> | ||
<p className="active">Time is running... / Time inactive</p> | ||
</section> | ||
); | ||
} |