Update ChatNotifications.tsx
This commit is contained in:
@@ -150,8 +150,8 @@ export default function ChatNotifications() {
|
|||||||
|
|
||||||
fetchUnreadCounts();
|
fetchUnreadCounts();
|
||||||
|
|
||||||
// Set polling interval (every 30 seconds)
|
// Set polling interval (every 10 seconds for more responsive notifications)
|
||||||
const intervalId = setInterval(fetchUnreadCounts, 30000);
|
const intervalId = setInterval(fetchUnreadCounts, 10000);
|
||||||
|
|
||||||
return () => clearInterval(intervalId);
|
return () => clearInterval(intervalId);
|
||||||
}, [loading, previousUnreadTotal]);
|
}, [loading, previousUnreadTotal]);
|
||||||
|
|||||||
Reference in New Issue
Block a user