-
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.
created score board and temp start game button yawn
- Loading branch information
1 parent
3d3ec98
commit 2f55a10
Showing
5 changed files
with
90 additions
and
38 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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Card } from "@/components/card"; | ||
|
||
interface ScoreProps { | ||
currentRound: number; | ||
start: () => void; | ||
score: number; | ||
} | ||
|
||
export default function Score({ currentRound, start, score }: ScoreProps) { | ||
return ( | ||
<Card> | ||
<article className="relative w-full h-full p-4 md:p-8"> | ||
{currentRound && ( | ||
<h2 | ||
id="featured-post" | ||
className="mt-4 text-3xl font-bold text-zinc-100 group-hover:text-white sm:text-4xl font-display" | ||
> | ||
Your Score: {score} / 5 | ||
</h2> | ||
)} | ||
|
||
<p className="mt-4 leading-8 duration-150 text-zinc-400 group-hover:text-zinc-300"> | ||
Current Round: {currentRound} | ||
</p> | ||
{!currentRound && ( | ||
<button | ||
onClick={() => start()} | ||
className="text-zinc-100 hover:text-white" | ||
> | ||
Start Game | ||
</button> | ||
)} | ||
|
||
{/* <div className="absolute bottom-4 md:bottom-8"> | ||
<p className="hidden text-zinc-200 hover:text-zinc-50 lg:block"> | ||
Read more <span aria-hidden="true">→</span> | ||
</p> | ||
</div> */} | ||
</article> | ||
</Card> | ||
); | ||
} |
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