Skip to content

Instantly share code, notes, and snippets.

@covelitein
Created August 17, 2023 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save covelitein/92f9660da646c305a9a0913f8d0c2ff1 to your computer and use it in GitHub Desktop.
Save covelitein/92f9660da646c305a9a0913f8d0c2ff1 to your computer and use it in GitHub Desktop.
p2e
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