feat(web): add chat info sync polling fallback
Some checks are pending
CI / test (push) Has started running
Some checks are pending
CI / test (push) Has started running
This commit is contained in:
@@ -290,6 +290,16 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
return () => window.removeEventListener("bm:chat-updated", onRealtimeChatUpdated);
|
||||
}, [open, chatId]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!open || !chatId) {
|
||||
return;
|
||||
}
|
||||
const timer = window.setInterval(() => {
|
||||
void refreshPanelData(chatId, false);
|
||||
}, 15000);
|
||||
return () => window.clearInterval(timer);
|
||||
}, [open, chatId]);
|
||||
|
||||
useEffect(() => {
|
||||
const onKeyDown = (event: KeyboardEvent) => {
|
||||
if (event.key === "Escape") {
|
||||
|
||||
Reference in New Issue
Block a user