Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
lint
Matheus Nogueira96fdce8e252b
diff --git a/frontend/src/pages/project/SettingsPage/components/CrossProjectSharingSection/CrossProjectSharingSection.tsx b/frontend/src/pages/project/SettingsPage/components/CrossProjectSharingSection/CrossProjectSharingSection.tsxindex b50b2c7fbc..02c25658fa 100644--- a/frontend/src/pages/project/SettingsPage/components/CrossProjectSharingSection/CrossProjectSharingSection.tsx+++ b/frontend/src/pages/project/SettingsPage/components/CrossProjectSharingSection/CrossProjectSharingSection.tsx@@ -53,12 +53,12 @@ type ProjectGroup = {};const groupGrantsByProject = (grants: TProjectFolderGrant[]): ProjectGroup[] => {- const byProject = new Map<string, TProjectFolderGrant[]>();- for (const grant of grants) {- const existing = byProject.get(grant.targetProjectId) ?? [];+ const byProject = grants.reduce((map, grant) => {+ const existing = map.get(grant.targetProjectId) ?? [];existing.push(grant);- byProject.set(grant.targetProjectId, existing);- }+ map.set(grant.targetProjectId, existing);+ return map;+ }, new Map<string, TProjectFolderGrant[]>());return Array.from(byProject.entries()).map(([targetProjectId, projectGrants]) => {const uniqueEnvs = new Set(projectGrants.map((g) => g.environmentSlug));@@ -277,8 +277,7 @@ export const CrossProjectSharingSection = () => {<div className="flex items-center justify-end gap-1.5 text-xs whitespace-nowrap text-muted"><KeyRound className="size-3 shrink-0" /><span className="tabular-nums">- {grant.secretCount}{" "}- {grant.secretCount === 1 ? "secret" : "secrets"}+ {grant.secretCount} {grant.secretCount === 1 ? "secret" : "secrets"}</span></div></TableCell>