Skip to content

Commit

Permalink
feat: hide archive tab when simplify enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Oct 31, 2024
1 parent 61bd397 commit 592801b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion frontend/src/component/menu/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ export const routes: IRoute[] = [
type: 'protected',
menu: {},
},

// Admin
{
path: '/admin/*',
Expand Down
20 changes: 11 additions & 9 deletions frontend/src/component/project/Project/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ export const Project = () => {
const basePath = `/projects/${projectId}`;
const projectName = project?.name || projectId;
const { favorite, unfavorite } = useFavoriteProjectsApi();
const useActionableChangeRequestIndicator = useUiFlag(
'simplifyProjectOverview',
);
const simplifyProjectOverview = useUiFlag('simplifyProjectOverview');

const [showDelDialog, setShowDelDialog] = useState(false);

Expand All @@ -148,11 +146,15 @@ export const Project = () => {
path: `${basePath}/health`,
name: 'health',
},
{
title: 'Archived flags',
path: `${basePath}/archive`,
name: 'archive',
},
...(simplifyProjectOverview
? []
: [
{
title: 'Archived flags',
path: `${basePath}/archive`,
name: 'archive',
} as ITab,
]),
{
title: 'Change requests',
path: `${basePath}/change-requests`,
Expand Down Expand Up @@ -327,7 +329,7 @@ export const Project = () => {
</span>
}
/>
{useActionableChangeRequestIndicator &&
{simplifyProjectOverview &&
tab.name ===
'change-request' && (
<ActionableChangeRequestsIndicator />
Expand Down

0 comments on commit 592801b

Please sign in to comment.