Skip to content

Commit

Permalink
fixed according to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Mav-Ivan committed Oct 31, 2024
1 parent e4d9a28 commit 48e511c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/containers/chat/chat-header/ChatHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,13 @@ const ChatHeader: FC<ChatHeaderProps> = ({
[currentChat._id]
)

const onAllMessagesResponse = useCallback((response: GetMessagesResponse) => {
const items = response.items ?? []
setAllMessages(items)
}, [])
const onAllMessagesResponse = useCallback(
(response: GetMessagesResponse) => {
const items = response.items ?? []
setAllMessages(items)
},
[setAllMessages]
)

const { fetchData } = useAxios({
service: getAllMessages,
Expand Down

0 comments on commit 48e511c

Please sign in to comment.