diff --git a/example/src/HomeScreen.tsx b/example/src/HomeScreen.tsx index f9c45bb5b..d67cf3288 100644 --- a/example/src/HomeScreen.tsx +++ b/example/src/HomeScreen.tsx @@ -100,16 +100,12 @@ function GroupListItem({ DecodedMessage[] >([]) const lastMessage = messages?.[0] - const [getConsentState, setConsentState] = useState() + const [consentState, setConsentState] = useState() const denyGroup = async () => { await client?.contacts.denyGroups([group.id]) - group - .consentState() - .then(setConsentState) - .catch((e) => { - console.error('Error denying contact: ', e) - }) + const consent = await group.consentState() + setConsentState(consent) } useEffect(() => { @@ -147,12 +143,12 @@ function GroupListItem({