linter fix
This commit is contained in:
parent
9e5af06761
commit
25dad3c906
|
@ -53,10 +53,10 @@ export const InboxProvider = (props: { children: JSX.Element }) => {
|
||||||
try {
|
try {
|
||||||
const message = await apiClient.createMessage(args)
|
const message = await apiClient.createMessage(args)
|
||||||
setMessages((prev) => [...prev, message])
|
setMessages((prev) => [...prev, message])
|
||||||
const chat = chats().find((chat) => chat.id === args.chat)
|
const currentChat = chats().find((chat) => chat.id === args.chat)
|
||||||
setChats((prev) => [
|
setChats((prev) => [
|
||||||
...prev.filter((c) => c.id !== chat.id),
|
...prev.filter((c) => c.id !== currentChat.id),
|
||||||
{ ...chat, updatedAt: message.createdAt }
|
{ ...currentChat, updatedAt: message.createdAt }
|
||||||
])
|
])
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('[post message error]:', error)
|
console.error('[post message error]:', error)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user