chore(authContext.tsx): add console log statement for error handling in the catch block of the promise
fix(EditNodeModal/index.tsx): add key prop to BaseModal component to fix React warning chore(formModal/index.tsx): add console log statement for error handling in the onerror event handler chore(LoginPage/index.tsx): add console log statement for error handling in the catch block of the promise chore(loginPage/index.tsx): add console log statement for error handling in the catch block of the promise
This commit is contained in:
parent
117d5acbf5
commit
9352a07571
5 changed files with 12 additions and 16 deletions
|
|
@ -66,7 +66,9 @@ export function AuthProvider({ children }): React.ReactElement {
|
|||
const isSuperUser = user!.is_superuser;
|
||||
setIsAdmin(isSuperUser);
|
||||
})
|
||||
.catch((error) => {});
|
||||
.catch((error) => {
|
||||
console.log("auth context");
|
||||
});
|
||||
} else {
|
||||
setLoading(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ const EditNodeModal = forwardRef(
|
|||
|
||||
return (
|
||||
<BaseModal
|
||||
key={data.id}
|
||||
size="large-h-full"
|
||||
open={modalOpen}
|
||||
setOpen={setModalOpen}
|
||||
|
|
|
|||
|
|
@ -297,18 +297,8 @@ export default function FormModal({
|
|||
handleOnClose(event);
|
||||
};
|
||||
newWs.onerror = (ev) => {
|
||||
if (flow.id === "") {
|
||||
connectWS();
|
||||
} else {
|
||||
setErrorData({
|
||||
title: "There was an error on web connection, please: ",
|
||||
list: [
|
||||
"Refresh the page",
|
||||
"Use a new flow tab",
|
||||
"Check if the backend is up",
|
||||
],
|
||||
});
|
||||
}
|
||||
console.log(ev);
|
||||
connectWS();
|
||||
};
|
||||
ws.current = newWs;
|
||||
} catch (error) {
|
||||
|
|
@ -430,7 +420,6 @@ export default function FormModal({
|
|||
setChatValue("");
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger hidden></DialogTrigger>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ export default function LoginAdminPage() {
|
|||
.then((user) => {
|
||||
setUserData(user);
|
||||
})
|
||||
.catch((error) => {});
|
||||
.catch((error) => {
|
||||
console.log("login admin page");
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ export default function LoginPage(): JSX.Element {
|
|||
setIsAdmin(isSuperUser);
|
||||
setUserData(user);
|
||||
})
|
||||
.catch((error) => {});
|
||||
.catch((error) => {
|
||||
console.log("login page");
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue