-
-
Save covelitein/92f9660da646c305a9a0913f8d0c2ff1 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 { useEffect } from 'react' | |
import { getInvitations } from "../services/blockchain" | |
import { useGlobalState } from '../store' | |
import { InvitationList, Header } from '../components' | |
const Invitations = () => { | |
const [invitations] = useGlobalState('invitations') | |
const fetchInvitations = async () => { | |
await getInvitations() | |
} | |
useEffect(() => { | |
fetchInvitations() | |
}, []) | |
return ( | |
<div> | |
<Header /> | |
<InvitationList invitations={invitations} /> | |
</div> | |
); | |
} | |
export default Invitations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment