fix: #641 delete wrong chat list

This commit is contained in:
Yidadaa
2023-04-09 23:41:16 +08:00
parent 174c745279
commit 4a492264a1
4 changed files with 8 additions and 6 deletions

View File

@@ -96,7 +96,7 @@ export function ChatList() {
index={i}
selected={i === selectedIndex}
onClick={() => selectSession(i)}
onDelete={chatStore.deleteSession}
onDelete={() => chatStore.deleteSession(i)}
/>
))}
{provided.placeholder}

View File

@@ -127,6 +127,7 @@
width: 100vw;
display: flex;
justify-content: center;
pointer-events: none;
.toast-content {
max-width: 80vw;
@@ -141,6 +142,7 @@
margin-bottom: 20px;
display: flex;
align-items: center;
pointer-events: all;
.toast-action {
padding-left: 20px;

View File

@@ -156,7 +156,7 @@ export function showToast(
};
setTimeout(() => {
close();
// close();
}, delay);
root.render(<Toast content={content} action={action} />);