Skip to content

Commit ec7ab40

Browse files
committed
Fix notifications visibility
1 parent 2ecbe5f commit ec7ab40

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

site/src/pages/DeploySettingsPage/Sidebar.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ import {
1313
Sidebar as BaseSidebar,
1414
SidebarNavItem,
1515
} from "components/Sidebar/Sidebar";
16+
import { useDashboard } from "modules/dashboard/useDashboard";
1617

1718
export const Sidebar: FC = () => {
19+
const { experiments } = useDashboard();
20+
1821
return (
1922
<BaseSidebar>
2023
<SidebarNavItem href="general" icon={LaunchOutlined}>
@@ -48,9 +51,11 @@ export const Sidebar: FC = () => {
4851
<SidebarNavItem href="observability" icon={InsertChartIcon}>
4952
Observability
5053
</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+
)}
5459
</BaseSidebar>
5560
);
5661
};

site/src/pages/UserSettingsPage/Sidebar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export const Sidebar: FC<SidebarProps> = ({ user }) => {
2424
const { entitlements, experiments } = useDashboard();
2525
const showSchedulePage =
2626
entitlements.features.advanced_template_scheduling.enabled;
27-
const showNotificationsPage = experiments.includes("notifications");
2827

2928
return (
3029
<BaseSidebar>
@@ -58,7 +57,7 @@ export const Sidebar: FC<SidebarProps> = ({ user }) => {
5857
<SidebarNavItem href="tokens" icon={VpnKeyOutlined}>
5958
Tokens
6059
</SidebarNavItem>
61-
{showNotificationsPage && (
60+
{experiments.includes("notifications") && (
6261
<SidebarNavItem href="notifications" icon={NotificationsIcon}>
6362
Notifications
6463
</SidebarNavItem>

0 commit comments

Comments
 (0)