diff --git a/client/src/components/firebase/SgyInitResults.tsx b/client/src/components/firebase/SgyInitResults.tsx index 74580b2e..e130e7cb 100644 --- a/client/src/components/firebase/SgyInitResults.tsx +++ b/client/src/components/firebase/SgyInitResults.tsx @@ -31,6 +31,7 @@ export default function SgyInitResults() { // Set the results to the value returned by initialization to be displayed useEffect(() => { + if (!auth.currentUser) return; if (auth.currentUser && sgyModal) { // console.log('hey!'); const init = httpsCallable(functions, "sgyfetch-init"); @@ -40,7 +41,7 @@ export default function SgyInitResults() { }); } // return (() => {console.log('I am unmounted!!!!!')}); - }, []) + }, [auth.currentUser]) const closeDialog = () => { setSgyModal(false);