File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,11 @@ import {
13
13
Sidebar as BaseSidebar ,
14
14
SidebarNavItem ,
15
15
} from "components/Sidebar/Sidebar" ;
16
+ import { useDashboard } from "modules/dashboard/useDashboard" ;
16
17
17
18
export const Sidebar : FC = ( ) => {
19
+ const { experiments } = useDashboard ( ) ;
20
+
18
21
return (
19
22
< BaseSidebar >
20
23
< SidebarNavItem href = "general" icon = { LaunchOutlined } >
@@ -48,9 +51,11 @@ export const Sidebar: FC = () => {
48
51
< SidebarNavItem href = "observability" icon = { InsertChartIcon } >
49
52
Observability
50
53
</ SidebarNavItem >
51
- < SidebarNavItem href = "notifications" icon = { NotificationsIcon } >
52
- Notifications
53
- </ SidebarNavItem >
54
+ { experiments . includes ( "notifications" ) && (
55
+ < SidebarNavItem href = "notifications" icon = { NotificationsIcon } >
56
+ Notifications
57
+ </ SidebarNavItem >
58
+ ) }
54
59
</ BaseSidebar >
55
60
) ;
56
61
} ;
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ export const Sidebar: FC<SidebarProps> = ({ user }) => {
24
24
const { entitlements, experiments } = useDashboard ( ) ;
25
25
const showSchedulePage =
26
26
entitlements . features . advanced_template_scheduling . enabled ;
27
- const showNotificationsPage = experiments . includes ( "notifications" ) ;
28
27
29
28
return (
30
29
< BaseSidebar >
@@ -58,7 +57,7 @@ export const Sidebar: FC<SidebarProps> = ({ user }) => {
58
57
< SidebarNavItem href = "tokens" icon = { VpnKeyOutlined } >
59
58
Tokens
60
59
</ SidebarNavItem >
61
- { showNotificationsPage && (
60
+ { experiments . includes ( "notifications" ) && (
62
61
< SidebarNavItem href = "notifications" icon = { NotificationsIcon } >
63
62
Notifications
64
63
</ SidebarNavItem >
You can’t perform that action at this time.
0 commit comments