mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 14:27:59 +00:00
Chore: Minor code cleanup
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
|||||||
verifySignupInvite
|
verifySignupInvite
|
||||||
} from "@app/hooks/api/auth/queries";
|
} from "@app/hooks/api/auth/queries";
|
||||||
import { fetchOrganizations } from "@app/hooks/api/organization/queries";
|
import { fetchOrganizations } from "@app/hooks/api/organization/queries";
|
||||||
|
import { navigateUserToOrg } from "@app/views/Login/Login.utils";
|
||||||
|
|
||||||
// eslint-disable-next-line new-cap
|
// eslint-disable-next-line new-cap
|
||||||
const client = new jsrp.client();
|
const client = new jsrp.client();
|
||||||
@@ -221,11 +222,11 @@ export default function SignupInvite() {
|
|||||||
SecurityClient.setSignupToken(response.token);
|
SecurityClient.setSignupToken(response.token);
|
||||||
setStep(2);
|
setStep(2);
|
||||||
} else {
|
} else {
|
||||||
const { token: newJwtToken } = await selectOrganization({ organizationId });
|
await selectOrganization({ organizationId });
|
||||||
SecurityClient.setToken(newJwtToken);
|
|
||||||
// user will be redirected to dashboard
|
// user will be redirected to dashboard
|
||||||
// if not logged in gets kicked out to login
|
// if not logged in gets kicked out to login
|
||||||
router.push(`/org/${organizationId}/overview`);
|
await navigateUserToOrg(router, organizationId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user