fix(conversation): update dependency on conversation ID for effect hooks
This commit is contained in:
@@ -173,7 +173,7 @@ export function ChatPanel() {
|
|||||||
toast.error(error instanceof Error ? error.message : "设置已读失败");
|
toast.error(error instanceof Error ? error.message : "设置已读失败");
|
||||||
});
|
});
|
||||||
}, [
|
}, [
|
||||||
conversation,
|
conversation?.id,
|
||||||
getViewport,
|
getViewport,
|
||||||
isNearBottom,
|
isNearBottom,
|
||||||
loading,
|
loading,
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export function KefuChatShell() {
|
|||||||
void markConversationRead().catch((readError) => {
|
void markConversationRead().catch((readError) => {
|
||||||
console.error("Failed to mark kefu conversation read", readError)
|
console.error("Failed to mark kefu conversation read", readError)
|
||||||
})
|
})
|
||||||
}, [conversation, isVisible, markConversationRead])
|
}, [conversation?.id, isVisible, markConversationRead])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return bindKefuHostBridge({
|
return bindKefuHostBridge({
|
||||||
|
|||||||
Reference in New Issue
Block a user