Removed awaits for emails, added redirect if invite verify fails

This commit is contained in:
Alex Holliday committed 2024-08-26 15:21:06 -07:00
1 parent c39eab49bd
commit 20b2b089a4
2 files changed
+31 -18

No files matched your search

+1 -2
View File
@@ -451,14 +451,13 @@ const Register = ({ isSuperAdmin }) => {
useEffect(() => {
const fetchInvite = async () => {
console.log("FETCHING");
if (token !== undefined) {
try {
const res = await networkService.verifyInvitationToken(token);
const { role, email, teamId } = res.data.data;
setForm({ ...form, email, role, teamId });
} catch (error) {
logger.error(error);
navigate("/register", { replace: true });
}
}
};