Browse Source

fix(web): prevent api call if there is no activedevice

pull/8/head
isra el 2 years ago
parent
commit
2481180a57
  1. 2
      web/components/dashboard/ReceiveSMS.tsx

2
web/components/dashboard/ReceiveSMS.tsx

@ -85,7 +85,7 @@ const ReceivedSMSList = () => {
}, [tabIndex, deviceList]) }, [tabIndex, deviceList])
useEffect(() => { useEffect(() => {
if (authUser) {
if (authUser && activeDeviceId) {
dispatch(fetchReceivedSMSList(activeDeviceId)) dispatch(fetchReceivedSMSList(activeDeviceId))
} }
}, [dispatch, authUser, activeDeviceId]) }, [dispatch, authUser, activeDeviceId])

Loading…
Cancel
Save