Last active
November 15, 2023 15:05
-
-
Save DewofyourYouth/cd86be6214362ba8cdedb8fc548f32b3 to your computer and use it in GitHub Desktop.
React Bad Adventure
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
function ChooseAdventure({ adventurer, choice }) { | |
return ( | |
<div id="adventure"> | |
{choice === "find the holy grail" && ( | |
<div> | |
Howdy there {adventurer.name}! Are you ready to find the holy grail? | |
<button onClick={() => goToGrailQuest(adventurer)}>Yes</button>{" "} | |
<button onClick={changeAdventure}>Change Adventure</button> | |
</div> | |
)} | |
{choice === "save princess peach" && ( | |
<div> | |
Howdy there {adventurer.name}! Are you ready to save Princess Peach? | |
<button onClick={() => goToMarioWorldQuest(adventurer)}> | |
Yes | |
</button>{" "} | |
<button onClick={changeAdventure}>Change Adventure</button> | |
</div> | |
)} | |
{choice === "save zelda from ganon" && ( | |
<div> | |
Howdy there {adventurer.name}! Are you ready to save Princess Zelda? | |
<button onClick={() => goToLegendOfZeldaQuest(adventurer)}> | |
Yes | |
</button>{" "} | |
<button onClick={changeAdventure}>Change Adventure</button> | |
</div> | |
)} | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment