From 375c07e4428ab7daad273d4396c8a0f41e085969 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Fri, 20 Sep 2024 10:49:50 +0800 Subject: [PATCH] style: removed unnecessary import and optimized sidebar styling - Removed unnecessary import and optimized sidebar styling for improved performance. --- src/renderer/src/components/app/Sidebar.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/renderer/src/components/app/Sidebar.tsx b/src/renderer/src/components/app/Sidebar.tsx index 8da91222..f86e012b 100644 --- a/src/renderer/src/components/app/Sidebar.tsx +++ b/src/renderer/src/components/app/Sidebar.tsx @@ -3,7 +3,7 @@ import { isMac } from '@renderer/config/constant' import { isLocalAi, UserAvatar } from '@renderer/config/env' import useAvatar from '@renderer/hooks/useAvatar' import { useSettings } from '@renderer/hooks/useSettings' -import { useRuntime, useShowAssistants } from '@renderer/hooks/useStore' +import { useRuntime } from '@renderer/hooks/useStore' import { Avatar } from 'antd' import { FC } from 'react' import { useTranslation } from 'react-i18next' @@ -17,7 +17,6 @@ const Sidebar: FC = () => { const { pathname } = useLocation() const avatar = useAvatar() const { minappShow } = useRuntime() - const { toggleShowAssistants } = useShowAssistants() const { generating } = useRuntime() const { t } = useTranslation() const navigate = useNavigate() @@ -38,16 +37,16 @@ const Sidebar: FC = () => { navigate(path) } - const onToggleShowAssistants = () => { - pathname === '/' ? toggleShowAssistants() : navigate('/') - } - return ( - + - + to('/')}> @@ -97,7 +96,6 @@ const Container = styled.div` border-right: 0.5px solid var(--color-border); margin-top: ${isMac ? 'var(--navbar-height)' : 0}; transition: background-color 0.3s ease; - z-index: 10000; ` const AvatarImg = styled(Avatar)`