Skip to content

Commit 39a87cd

Browse files
authored
chore(chat): make deleteChat func calls async (#1062)
1 parent e5a6b6d commit 39a87cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/web/src/components/ChatList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ const ChatList: React.FC<Props> = (props) => {
1818
const navigate = useNavigate();
1919

2020
const onDelete = useCallback(
21-
(_chatId: string) => {
21+
async (_chatId: string) => {
2222
navigate('/chat');
23-
return deleteChat(_chatId).catch(() => {
23+
return await deleteChat(_chatId).catch(() => {
2424
navigate(`/chat/${_chatId}`);
2525
});
2626
},

0 commit comments

Comments
 (0)