Skip to content

Commit 277c9da

Browse files
wrap menu item w/ separate flag check (#19220)
1 parent 93fc476 commit 277c9da

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

components/dashboard/src/data/featureflag-query.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const featureFlags = {
2828
repositoryFinderSearch: false,
2929
createProjectModal: false,
3030
repoConfigListAndDetail: false,
31+
showRepoConfigMenuItem: false,
3132
};
3233

3334
type FeatureFlags = typeof featureFlags;

components/dashboard/src/menu/OrganizationSelector.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function OrganizationSelector() {
2424
const { data: billingMode } = useOrgBillingMode();
2525
const getOrgURL = useGetOrgURL();
2626
const repoConfigListAndDetail = useFeatureFlag("repoConfigListAndDetail");
27+
const showRepoConfigMenuItem = useFeatureFlag("showRepoConfigMenuItem");
2728

2829
// we should have an API to ask for permissions, until then we duplicate the logic here
2930
const canCreateOrgs = user && !isOrganizationOwned(user);
@@ -55,7 +56,8 @@ export default function OrganizationSelector() {
5556

5657
// Show members if we have an org selected
5758
if (currentOrg.data) {
58-
if (repoConfigListAndDetail) {
59+
// Check both flags as one just controls if the menu item is present, the other if the page is accessible
60+
if (repoConfigListAndDetail && showRepoConfigMenuItem) {
5961
linkEntries.push({
6062
title: "Repositories",
6163
customContent: <LinkEntry>Repositories</LinkEntry>,

0 commit comments

Comments
 (0)