useEffect on is open

This commit is contained in:
arc-alex
2024-01-06 15:41:55 +01:00
parent 19536c3ea8
commit 4e49ca3ebe
2 changed files with 2 additions and 1 deletions
@@ -74,7 +74,7 @@ export default function SheetsModal(props: SheetsModalProps) {
if (state.clientSecret.complet) testAuthentication();
if (state.authenticate.complet) testSheetId();
}
}, []);
}, [isOpen]);
const handleClose = () => {
setRundown(null);
+1
View File
@@ -367,6 +367,7 @@ class Sheet {
if (res.data.rundown.length < 1) {
throw new Error(`Sheet: Could not find data to import in the worksheet`);
}
console.log(parseProject(dataFromSheet));
res.data.project = parseProject(dataFromSheet);
res.data.userFields = parseUserFields(dataFromSheet);
return res;