diff --git a/frontend/src/component/project/Project/Project.tsx b/frontend/src/component/project/Project/Project.tsx index 5b668ff22d43..1c68e975add8 100644 --- a/frontend/src/component/project/Project/Project.tsx +++ b/frontend/src/component/project/Project/Project.tsx @@ -75,7 +75,7 @@ interface ITab { flag?: keyof UiFlags; new?: boolean; isEnterprise?: boolean; - label?: () => ReactNode; + labelOverride?: () => ReactNode; } const StyledCounterBadge = styled(CounterBadge)(({ theme }) => ({ @@ -94,9 +94,14 @@ const TabText = styled('span')(({ theme }) => ({ })); const ChangeRequestsLabel = () => { + const simplifyProjectOverview = useUiFlag('simplifyProjectOverview'); const projectId = useRequiredPathParam('projectId'); const { total } = useActionableChangeRequests(projectId); + if (!simplifyProjectOverview) { + return 'Change requests'; + } + return ( Change requests @@ -167,7 +172,7 @@ export const Project = () => { path: `${basePath}/change-requests`, name: 'change-request', isEnterprise: true, - label: simplifyProjectOverview ? ChangeRequestsLabel : undefined, + labelOverride: ChangeRequestsLabel, }, { title: 'Applications', @@ -319,7 +324,13 @@ export const Project = () => { + ) : ( + tab.title + ) + } value={tab.path} onClick={() => { if (tab.title !== 'Flags') {