Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions packages/web/app/src/pages/project-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,13 @@ function ProjectSettingsContent(props: {
title: 'Policy',
});

if (project?.type === ProjectType.Federation) {
pages.push({
key: 'composition',
title: 'Composition',
});
}

return pages;
}, [project]);

Expand Down Expand Up @@ -609,10 +616,6 @@ function ProjectSettingsContent(props: {
/>
) : null}

{project.type === ProjectType.Federation ? (
<CompositionSettings project={project} organization={organization} />
) : null}

{project.viewerCanDelete ? (
<ProjectDelete projectSlug={project.slug} organizationSlug={organization.slug} />
) : null}
Expand All @@ -621,13 +624,16 @@ function ProjectSettingsContent(props: {
{resolvedPage.key === 'policy' ? (
<ProjectPolicySettings organizationSlug={organization.slug} project={project} />
) : null}
{resolvedPage.key === 'composition' ? (
<CompositionSettings project={project} organization={organization} />
) : null}
</div>
</PageLayoutContent>
</PageLayout>
);
}

export const ProjectSettingsPageEnum = z.enum(['general', 'policy']);
export const ProjectSettingsPageEnum = z.enum(['general', 'policy', 'composition']);

export type ProjectSettingsSubPage = z.TypeOf<typeof ProjectSettingsPageEnum>;

Expand Down
Loading