Removed awaits for emails, added redirect if invite verify fails
This commit is contained in:
1 parent
c39eab49bd
commit
20b2b089a4
2 files changed
+31
-18
No files matched your search
@@ -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 });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user