mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-10 01:16:39 +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 celebatoryUnleash = useUiFlag('celebrateUnleash');
|
||||
const insightsDashboard = useUiFlag('executiveDashboard');
|
||||
|
||||
const routes = getRoutes();
|
||||
const adminRoutes = useAdminRoutes();
|
||||
@ -247,6 +248,12 @@ const Header: VFC = () => {
|
||||
|
||||
<StyledNav>
|
||||
<StyledLinks>
|
||||
<ConditionallyRender
|
||||
condition={insightsDashboard}
|
||||
show={
|
||||
<StyledLink to='/insights'>Insights</StyledLink>
|
||||
}
|
||||
/>
|
||||
<StyledLink to='/projects'>Projects</StyledLink>
|
||||
<StyledLink to={'/search'}>Search</StyledLink>
|
||||
<StyledLink to='/playground'>Playground</StyledLink>
|
||||
|
@ -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",
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user