diff --git a/web/containers/Sidebar/Left.tsx b/web/containers/Sidebar/Left.tsx
index 52500222e..62b298543 100644
--- a/web/containers/Sidebar/Left.tsx
+++ b/web/containers/Sidebar/Left.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import React, { useContext } from 'react'
import { useAtomValue, useSetAtom } from 'jotai'
import {
MainViewState,
@@ -20,6 +20,9 @@ import { twMerge } from 'tailwind-merge'
import { showingBotListModalAtom } from '@helpers/atoms/Modal.atom'
import useGetBots from '@hooks/useGetBots'
import { useUserConfigs } from '@hooks/useUserConfigs'
+import {
+ FeatureToggleContext,
+} from '@helpers/FeatureToggleWrapper'
export const SidebarLeft = () => {
const [config] = useUserConfigs()
@@ -28,6 +31,7 @@ export const SidebarLeft = () => {
const setBotListModal = useSetAtom(showingBotListModalAtom)
const { downloadedModels } = useGetDownloadedModels()
const { getAllBots } = useGetBots()
+ const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
const onMenuClick = (mainViewState: MainViewState) => {
if (currentState === mainViewState) return
@@ -88,18 +92,21 @@ export const SidebarLeft = () => {
icon:
,
state: MainViewState.MyModel,
},
- {
- name: 'Bot',
- icon:
,
- state: MainViewState.CreateBot,
- },
+ ...(experimentalFeatureEnabed
+ ? [
+ {
+ name: 'Bot',
+ icon:
,
+ state: MainViewState.CreateBot,
+ },
+ ]
+ : []),
{
name: 'Settings',
icon:
,
state: MainViewState.Setting,
},
]
-
return (
{
config.sidebarLeftExpand ? 'items-start' : 'items-center'
)}
>
- {menus.map((menu, i) => {
- const isActive = currentState === menu.state
- const isBotMenu = menu.name === 'Bot'
- return (
-
-
+ {isActive ? (
+
+ ) : null}
+
+ )
+ })}