mirror of
https://github.com/lorsanstand/Aether.git
synced 2026-09-18 14:18:20 +03:00
front fix
This commit is contained in:
@@ -14,11 +14,11 @@ export const useChatStore = create<ChatStore>()(
|
||||
(set) => ({
|
||||
chats: [],
|
||||
|
||||
setChats: (chats) => set({ chats }),
|
||||
setChats: (chats) => set({ chats: Array.isArray(chats) ? chats : [] }),
|
||||
|
||||
updateChat: (chatId, updates) =>
|
||||
set((state) => ({
|
||||
chats: state.chats.map(chat =>
|
||||
chats: (Array.isArray(state.chats) ? state.chats : []).map(chat =>
|
||||
chat.chat_id === chatId ? { ...chat, ...updates } : chat
|
||||
)
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user