mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-18 01:18:23 +02:00
feat: add menu item for insights (#6420)
This commit is contained in:
parent
de5a0f2825
commit
6678012b03
@ -166,6 +166,7 @@ const Header: VFC = () => {
|
|||||||
|
|
||||||
const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
|
const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
|
||||||
const celebatoryUnleash = useUiFlag('celebrateUnleash');
|
const celebatoryUnleash = useUiFlag('celebrateUnleash');
|
||||||
|
const insightsDashboard = useUiFlag('executiveDashboard');
|
||||||
|
|
||||||
const routes = getRoutes();
|
const routes = getRoutes();
|
||||||
const adminRoutes = useAdminRoutes();
|
const adminRoutes = useAdminRoutes();
|
||||||
@ -247,6 +248,12 @@ const Header: VFC = () => {
|
|||||||
|
|
||||||
<StyledNav>
|
<StyledNav>
|
||||||
<StyledLinks>
|
<StyledLinks>
|
||||||
|
<ConditionallyRender
|
||||||
|
condition={insightsDashboard}
|
||||||
|
show={
|
||||||
|
<StyledLink to='/insights'>Insights</StyledLink>
|
||||||
|
}
|
||||||
|
/>
|
||||||
<StyledLink to='/projects'>Projects</StyledLink>
|
<StyledLink to='/projects'>Projects</StyledLink>
|
||||||
<StyledLink to={'/search'}>Search</StyledLink>
|
<StyledLink to={'/search'}>Search</StyledLink>
|
||||||
<StyledLink to='/playground'>Playground</StyledLink>
|
<StyledLink to='/playground'>Playground</StyledLink>
|
||||||
|
@ -10,6 +10,18 @@ exports[`returns all baseRoutes 1`] = `
|
|||||||
"title": "Unleash",
|
"title": "Unleash",
|
||||||
"type": "protected",
|
"type": "protected",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"component": [Function],
|
||||||
|
"enterprise": false,
|
||||||
|
"flag": "executiveDashboard",
|
||||||
|
"menu": {
|
||||||
|
"advanced": true,
|
||||||
|
"mobile": true,
|
||||||
|
},
|
||||||
|
"path": "/insights",
|
||||||
|
"title": "Insights",
|
||||||
|
"type": "protected",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"component": {
|
"component": {
|
||||||
"$$typeof": Symbol(react.lazy),
|
"$$typeof": Symbol(react.lazy),
|
||||||
@ -423,14 +435,5 @@ exports[`returns all baseRoutes 1`] = `
|
|||||||
"title": "Profile",
|
"title": "Profile",
|
||||||
"type": "protected",
|
"type": "protected",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"component": [Function],
|
|
||||||
"enterprise": true,
|
|
||||||
"flag": "executiveDashboard",
|
|
||||||
"menu": {},
|
|
||||||
"path": "/dashboard",
|
|
||||||
"title": "Executive dashboard",
|
|
||||||
"type": "protected",
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -60,6 +60,17 @@ export const routes: IRoute[] = [
|
|||||||
isStandalone: true,
|
isStandalone: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Insights - previously "Executive dashboard"
|
||||||
|
{
|
||||||
|
path: '/insights',
|
||||||
|
title: 'Insights',
|
||||||
|
component: ExecutiveDashboard,
|
||||||
|
type: 'protected',
|
||||||
|
menu: { mobile: true, advanced: true },
|
||||||
|
flag: 'executiveDashboard',
|
||||||
|
enterprise: false,
|
||||||
|
},
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
{
|
{
|
||||||
path: '/projects/create',
|
path: '/projects/create',
|
||||||
@ -439,17 +450,6 @@ export const routes: IRoute[] = [
|
|||||||
menu: {},
|
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 */
|
/* If you update this route path, make sure you update the path in SWRProvider.tsx */
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
|
Loading…
Reference in New Issue
Block a user