From 2481180a57ebf482ec13d7ae087bb1e55e36350e Mon Sep 17 00:00:00 2001 From: isra el Date: Sat, 20 Apr 2024 14:14:15 +0300 Subject: [PATCH] fix(web): prevent api call if there is no activedevice --- web/components/dashboard/ReceiveSMS.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/dashboard/ReceiveSMS.tsx b/web/components/dashboard/ReceiveSMS.tsx index b879969..689fbbc 100644 --- a/web/components/dashboard/ReceiveSMS.tsx +++ b/web/components/dashboard/ReceiveSMS.tsx @@ -85,7 +85,7 @@ const ReceivedSMSList = () => { }, [tabIndex, deviceList]) useEffect(() => { - if (authUser) { + if (authUser && activeDeviceId) { dispatch(fetchReceivedSMSList(activeDeviceId)) } }, [dispatch, authUser, activeDeviceId])