diff --git a/app/components/sidebar.tsx b/app/components/sidebar.tsx index a06262fef..91ddd4c23 100644 --- a/app/components/sidebar.tsx +++ b/app/components/sidebar.tsx @@ -152,7 +152,7 @@ export function SideBar(props: { className?: string }) { useHotKey(); let bodyComponent: React.JSX.Element; - let isChat: boolean; + let isChat: boolean = false; switch (location.pathname) { case Path.Sd: bodyComponent = ; @@ -161,6 +161,7 @@ export function SideBar(props: { className?: string }) { isChat = true; bodyComponent = ; } + // @ts-ignore return (
-
- } - text={shouldNarrow ? undefined : Locale.Home.NewChat} - onClick={() => { - if (config.dontShowMaskSplashScreen) { - chatStore.newSession(); - navigate(Path.Chat); - } else { - navigate(Path.NewChat); - } - }} - shadow - /> -
+ {isChat && ( +
+ } + text={shouldNarrow ? undefined : Locale.Home.NewChat} + onClick={() => { + if (config.dontShowMaskSplashScreen) { + chatStore.newSession(); + navigate(Path.Chat); + } else { + navigate(Path.NewChat); + } + }} + shadow + /> +
+ )}