File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
frontend/src/components/navigations/top-nav-bar Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import {
1616 FileProtectOutlined ,
1717 LikeOutlined ,
1818 LoginOutlined ,
19+ SettingOutlined ,
1920} from "@ant-design/icons" ;
2021import { useEffect , useState , useMemo , useCallback } from "react" ;
2122import { useNavigate , useLocation } from "react-router-dom" ;
@@ -162,6 +163,8 @@ function TopNavBar({ isSimpleLayout, topNavBarOptions }) {
162163
163164 const isUnstract = ! ( selectedProduct && selectedProduct !== "unstract" ) ;
164165 const isAPIHub = selectedProduct && selectedProduct === "verticals" ;
166+ const isStaff = sessionDetails ?. isStaff || sessionDetails ?. is_staff ;
167+ const isOpenSource = orgName === "mock_org" ;
165168
166169 // Check user role and whether the onboarding is incomplete
167170 useEffect ( ( ) => {
@@ -349,6 +352,22 @@ function TopNavBar({ isSimpleLayout, topNavBarOptions }) {
349352 } ) ;
350353 }
351354
355+ // Custom Plans
356+ if ( isUnstract && isStaff && ! isOpenSource ) {
357+ menuItems . push ( {
358+ key : "8" ,
359+ label : (
360+ < Button
361+ onClick = { ( ) => navigate ( `/${ orgName } /admin/custom-plans` ) }
362+ className = "logout-button"
363+ type = "text"
364+ >
365+ < SettingOutlined /> Custom Plans
366+ </ Button >
367+ ) ,
368+ } ) ;
369+ }
370+
352371 const handleLogin = ( ) => {
353372 const baseUrl = getBaseUrl ( ) ;
354373 const newURL = baseUrl + "/api/v1/login" ;
You can’t perform that action at this time.
0 commit comments