From 323c7b50f18f5138423d8bd93d2f3c75d0af51f6 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Sun, 22 Sep 2024 14:23:01 +0300 Subject: [PATCH] fix --- src/components/Group/Group.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx index b55d214..85c7301 100644 --- a/src/components/Group/Group.tsx +++ b/src/components/Group/Group.tsx @@ -808,19 +808,16 @@ export const Group = ({ } }; - useEffect(()=> { - if(!selectedGroup) return - getGroupOwner(selectedGroup?.groupId); - }, [selectedGroup]) + useEffect(() => { - if (selectedGroup && groupOwner && groupOwner?.isOpen === false) { + if (selectedGroup) { setTriedToFetchSecretKey(false); getSecretKey(true); - // getGroupOwner(selectedGroup?.groupId); + getGroupOwner(selectedGroup?.groupId); } - }, [selectedGroup, groupOwner]); + }, [selectedGroup]); // const handleNotification = async (data)=> { // try {