generated from scaffold-eth/scaffold-eth-2
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #11 from Avelous/staging
Updates
- Loading branch information
Showing
6 changed files
with
88 additions
and
56 deletions.
There are no files selected for viewing
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
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,39 @@ | ||
import { Dispatch, SetStateAction } from "react"; | ||
import { Address } from "../scaffold-eth"; | ||
import { Game } from "~~/types/game/game"; | ||
|
||
const HostAnnouncement = ({ | ||
isOpen, | ||
setIsOpen, | ||
|
||
game, | ||
}: { | ||
isOpen: boolean; | ||
setIsOpen: Dispatch<SetStateAction<boolean>>; | ||
game: Game; | ||
}) => { | ||
const closePopup = () => { | ||
setIsOpen(false); | ||
}; | ||
|
||
return ( | ||
<div className=" overflow-hidden w-fit text-xl bg-base-200 h-full"> | ||
{isOpen && ( | ||
<div className="fixed inset-0 flex items-center justify-center bg-opacity-50 z-20"> | ||
<div className="modal-box md:h-[30%] flex flex-col items-center"> | ||
<label onClick={closePopup} className="btn btn-sm btn-circle absolute right-2 top-2"> | ||
✕ | ||
</label> | ||
<p className="text-center">The Winner is</p> | ||
<Address address={game.winner as string} format="long" /> | ||
<p className="mt-5 text-2xl text-center"> | ||
The hidden characters are {Object.values(game.hiddenChars).join(", ")} | ||
</p> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default HostAnnouncement; |
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