diff --git a/frontend/src/component/menu/Header/Header.tsx b/frontend/src/component/menu/Header/Header.tsx index 5d4ade9f08..ae860c6a1e 100644 --- a/frontend/src/component/menu/Header/Header.tsx +++ b/frontend/src/component/menu/Header/Header.tsx @@ -166,6 +166,7 @@ const Header: VFC = () => { const increaseUnleashWidth = useUiFlag('increaseUnleashWidth'); const celebatoryUnleash = useUiFlag('celebrateUnleash'); + const insightsDashboard = useUiFlag('executiveDashboard'); const routes = getRoutes(); const adminRoutes = useAdminRoutes(); @@ -247,6 +248,12 @@ const Header: VFC = () => { + Insights + } + /> Projects Search Playground diff --git a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap index e9f1d7e2bf..d474d0202d 100644 --- a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap +++ b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap @@ -10,6 +10,18 @@ exports[`returns all baseRoutes 1`] = ` "title": "Unleash", "type": "protected", }, + { + "component": [Function], + "enterprise": false, + "flag": "executiveDashboard", + "menu": { + "advanced": true, + "mobile": true, + }, + "path": "/insights", + "title": "Insights", + "type": "protected", + }, { "component": { "$$typeof": Symbol(react.lazy), @@ -423,14 +435,5 @@ exports[`returns all baseRoutes 1`] = ` "title": "Profile", "type": "protected", }, - { - "component": [Function], - "enterprise": true, - "flag": "executiveDashboard", - "menu": {}, - "path": "/dashboard", - "title": "Executive dashboard", - "type": "protected", - }, ] `; diff --git a/frontend/src/component/menu/routes.ts b/frontend/src/component/menu/routes.ts index d26ac722eb..d0d7aaaa0c 100644 --- a/frontend/src/component/menu/routes.ts +++ b/frontend/src/component/menu/routes.ts @@ -60,6 +60,17 @@ export const routes: IRoute[] = [ isStandalone: true, }, + // Insights - previously "Executive dashboard" + { + path: '/insights', + title: 'Insights', + component: ExecutiveDashboard, + type: 'protected', + menu: { mobile: true, advanced: true }, + flag: 'executiveDashboard', + enterprise: false, + }, + // Project { path: '/projects/create', @@ -439,17 +450,6 @@ export const routes: IRoute[] = [ menu: {}, }, - // Executive dashboard - { - path: '/dashboard', - title: 'Executive dashboard', - component: ExecutiveDashboard, - type: 'protected', - menu: {}, - flag: 'executiveDashboard', - enterprise: true, - }, - /* If you update this route path, make sure you update the path in SWRProvider.tsx */ { path: '/login',