-
-
Save covelitein/63caf10d8bd3bd521503e39e91b7c604 to your computer and use it in GitHub Desktop.
p2e
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
import React, { useEffect } from 'react' | |
import { Header, GameList, InviteModal } from '../components' | |
import { getMyGames } from '../services/blockchain' | |
import { useGlobalState } from '../store' | |
const MyGames = () => { | |
const [myGames] = useGlobalState('myGames') | |
const fetchGameData = async () => { | |
await getMyGames() | |
} | |
useEffect(() => { | |
fetchGameData() | |
}, []) | |
return ( | |
<div> | |
<Header /> | |
<GameList games={myGames} /> | |
<InviteModal /> | |
</div> | |
) | |
} | |
export default MyGames |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment