Mapping Scenes
Keep track of current scene
const [menuPage, setMenuPage] = useState('MainMenu');Change current scene
const handlePlayGame = (id) => {
console.log('selectedNFT', id);
localStorage.setItem('selectedNFT', id);
setMenuPage('Game');
};<button className="Connect" disabled={selectedNFT == ''} onClick={() => handlePlayGame(selectedNFT)}>
{`Play with NFT#${selectedNFT}`}
</button>Initialize Play Game Component
Map the scene using a dictionary
This is the branch with the changes done:
Last updated
Was this helpful?
