Skip to content

Commit a66013d

Browse files
authored
fix(app): don't show the edit base schema option on federation projects (#6961)
1 parent e57b6c0 commit a66013d

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

.changeset/warm-pans-approve.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hive': patch
3+
---
4+
5+
Prevent editing the base schema showing up for federation projects.

packages/web/app/src/pages/target-settings.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,20 +1334,23 @@ function TargetSettingsContent(props: {
13341334
}> = [];
13351335

13361336
if (currentTarget?.viewerCanModifySettings) {
1337-
pages.push(
1338-
{
1339-
key: 'general',
1340-
title: 'General',
1341-
},
1342-
{
1337+
pages.push({
1338+
key: 'general',
1339+
title: 'General',
1340+
});
1341+
1342+
if (currentProject?.type !== ProjectType.Federation) {
1343+
pages.push({
13431344
key: 'base-schema',
13441345
title: 'Base Schema',
1345-
},
1346-
{
1347-
key: 'breaking-changes',
1348-
title: 'Breaking Changes',
1349-
},
1350-
);
1346+
});
1347+
}
1348+
1349+
pages.push({
1350+
key: 'breaking-changes',
1351+
title: 'Breaking Changes',
1352+
});
1353+
13511354
if (currentProject?.type === ProjectType.Federation) {
13521355
pages.push({
13531356
key: 'schema-contracts',

0 commit comments

Comments
 (0)