mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: review comments
This commit is contained in:
@@ -20,9 +20,14 @@ export default function TeamInviteStep(): JSX.Element {
|
||||
const { mutateAsync } = useAddUsersToOrg();
|
||||
const { handlePopUpToggle, popUp, handlePopUpOpen } = usePopUp(["setUpEmail"] as const);
|
||||
|
||||
const orgId = String(localStorage.getItem("orgData.id"));
|
||||
|
||||
// Redirect user to the getting started page
|
||||
const redirectToHome = async () => {
|
||||
navigate({ to: "/" as const });
|
||||
navigate({
|
||||
to: orgId ? ("/organizations/$orgId/projects" as const) : "/",
|
||||
params: { orgId }
|
||||
});
|
||||
};
|
||||
|
||||
const inviteUsers = async ({ emails: inviteEmails }: { emails: string }) => {
|
||||
@@ -32,7 +37,7 @@ export default function TeamInviteStep(): JSX.Element {
|
||||
.map(async (email) => {
|
||||
mutateAsync({
|
||||
inviteeEmails: [email],
|
||||
organizationId: String(localStorage.getItem("orgData.id")),
|
||||
organizationId: orgId,
|
||||
organizationRoleSlug: "member"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -38,7 +38,9 @@ export const AssumePrivilegeModeBanner = () => {
|
||||
{
|
||||
onSuccess: () => {
|
||||
const url = `${getProjectHomePage(currentProject.type, currentProject.environments)}${isSubOrganization ? `?subOrganization=${currentOrg.slug}` : ""}`;
|
||||
window.location.href = url.replace("$projectId", currentProject.id);
|
||||
window.location.assign(
|
||||
url.replace("$orgId", currentOrg.id).replace("$projectId", currentProject.id)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -163,7 +163,7 @@ export const ProjectSelect = () => {
|
||||
}
|
||||
});
|
||||
const urlInstance = new URL(
|
||||
`${window.location.origin}/${url.to.replaceAll("$projectId", workspace.id)}`
|
||||
`${window.location.origin}${url.to.replaceAll("$orgId", url.params.orgId).replaceAll("$projectId", url.params.projectId)}`
|
||||
);
|
||||
if (currentOrg?.subOrganization) {
|
||||
urlInstance.searchParams.set(
|
||||
|
||||
@@ -155,7 +155,9 @@ export const GroupMembersTable = ({ groupMembership }: Props) => {
|
||||
});
|
||||
|
||||
const url = `${getProjectHomePage(currentProject.type, currentProject.environments)}${isSubOrganization ? `?subOrganization=${currentOrg.slug}` : ""}`;
|
||||
window.location.href = url.replace("$projectId", currentProject.id);
|
||||
window.location.assign(
|
||||
url.replace("$orgId", currentOrg.id).replace("$projectId", currentProject.id)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -95,7 +95,9 @@ const Page = () => {
|
||||
text: "Identity privilege assumption has started"
|
||||
});
|
||||
const url = `${getProjectHomePage(currentProject.type, currentProject.environments)}${isSubOrganization && isNonScopedIdentity ? `?subOrganization=${currentOrg.slug}` : ""}`;
|
||||
window.location.href = url.replace("$projectId", currentProject.id);
|
||||
window.location.assign(
|
||||
url.replace("$orgId", currentOrg.id).replace("$projectId", currentProject.id)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -74,7 +74,9 @@ export const Page = () => {
|
||||
});
|
||||
|
||||
const url = `${getProjectHomePage(currentProject.type, currentProject.environments)}${isSubOrganization ? `?subOrganization=${currentOrg.slug}` : ""}`;
|
||||
window.location.href = url.replace("$projectId", currentProject.id);
|
||||
window.location.assign(
|
||||
url.replace("$orgId", currentOrg.id).replace("$projectId", currentProject.id)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user