feat: #499 revert delete session

This commit is contained in:
Yidadaa
2023-04-07 00:14:27 +08:00
parent 806587c8ea
commit 5952064362
11 changed files with 80 additions and 17 deletions

View File

@@ -93,6 +93,7 @@ function _Home() {
state.removeSession,
],
);
const chatStore = useChatStore();
const loading = !useHasHydrated();
const [showSideBar, setShowSideBar] = useState(true);
@@ -142,11 +143,7 @@ function _Home() {
<div className={styles["sidebar-action"] + " " + styles.mobile}>
<IconButton
icon={<CloseIcon />}
onClick={() => {
if (confirm(Locale.Home.DeleteChat)) {
removeSession(currentIndex);
}
}}
onClick={chatStore.deleteSession}
/>
</div>
<div className={styles["sidebar-action"]}>