[chore] rework useObservable hook to properly re-subsrive when the state change

This commit is contained in:
MathieuG-P
2024-01-07 16:22:51 +01:00
parent cc42f0a978
commit c54185b348
32 changed files with 93 additions and 75 deletions
@@ -7,7 +7,7 @@ import { useService } from "renderer/hooks/use-service.hook";
export function NotificationOverlay() {
const notificationService = useService(NotificationService);
const notifications = useObservable(notificationService.notifications$);
const notifications = useObservable(() => notificationService.notifications$);
return (
<ul className="absolute h-full w-0 top-0 right-0 z-[100] pt-10">