From 51f2385b75fe9d013e15e70a18f41455eb0cddbd Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Fri, 7 Apr 2023 17:52:03 +0800 Subject: [PATCH] style: compact new folder --- src/components/Menu/ChatHistoryList.tsx | 2 -- src/components/Menu/Menu.tsx | 6 +++++- src/components/Menu/NewChat.tsx | 2 +- src/components/Menu/NewFolder.tsx | 5 +---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/Menu/ChatHistoryList.tsx b/src/components/Menu/ChatHistoryList.tsx index 4502cd0..42a9757 100644 --- a/src/components/Menu/ChatHistoryList.tsx +++ b/src/components/Menu/ChatHistoryList.tsx @@ -2,7 +2,6 @@ import React, { useEffect, useRef, useState } from 'react'; import useStore from '@store/store'; import { shallow } from 'zustand/shallow'; -import NewFolder from './NewFolder'; import ChatFolder from './ChatFolder'; import ChatHistory from './ChatHistory'; import ChatSearch from './ChatSearch'; @@ -164,7 +163,6 @@ const ChatHistoryList = () => { onDragLeave={handleDragLeave} onDragEnd={handleDragEnd} > -
{Object.keys(chatFolders).map((folderId) => ( diff --git a/src/components/Menu/Menu.tsx b/src/components/Menu/Menu.tsx index 70ceb5d..d808368 100644 --- a/src/components/Menu/Menu.tsx +++ b/src/components/Menu/Menu.tsx @@ -3,6 +3,7 @@ import React, { useEffect, useRef } from 'react'; import useStore from '@store/store'; import NewChat from './NewChat'; +import NewFolder from './NewFolder'; import ChatHistoryList from './ChatHistoryList'; import MenuOptions from './MenuOptions'; @@ -38,7 +39,10 @@ const Menu = () => {
diff --git a/src/components/Menu/NewChat.tsx b/src/components/Menu/NewChat.tsx index 4d1b2ef..6b903d8 100644 --- a/src/components/Menu/NewChat.tsx +++ b/src/components/Menu/NewChat.tsx @@ -13,7 +13,7 @@ const NewChat = ({ folder }: { folder?: string }) => { return ( { if (!generating) addFolder(); }} > - {' '} - - {t('newFolder')} - + ); };