diff --git a/src/components/manage/ManagePage.tsx b/src/components/manage/ManagePage.tsx index 4b943e8..e11de66 100644 --- a/src/components/manage/ManagePage.tsx +++ b/src/components/manage/ManagePage.tsx @@ -463,10 +463,10 @@ function GroupsTab({ spaceId }: { spaceId?: string }) { {groups.map((g) => { - const groupProjectNames = maps + const groupProjectEntries = maps .filter((m) => m.group_id === g.id) - .map((m) => projects.find((p) => p.id === m.project_id)?.name) - .filter((n): n is string => !!n); + .map((m) => { const p = projects.find((x) => x.id === m.project_id); return p ? { id: p.id, name: p.name } : null; }) + .filter((e): e is { id: string; name: string } => e !== null); return ( @@ -475,9 +475,13 @@ function GroupsTab({ spaceId }: { spaceId?: string }) {
- {groupProjectNames.length > 0 ? groupProjectNames.map((name) => ( - + {groupProjectEntries.length > 0 ? groupProjectEntries.map(({ id, name }) => ( + {name} + )) : (