eslint and build
Some checks failed
CI / Rustfmt (push) Successful in 22s
CI / Cargo Audit & Deny (push) Failing after 32s
CI / Web Blocking Checks (push) Successful in 47s
CI / Security Blocking Checks (push) Successful in 9s
CI / Clippy (push) Successful in 2m9s
CI / Web Advisory Checks (push) Successful in 37s
CI / Security Advisory Checks (push) Successful in 34s
CI / Tests (push) Failing after 8m37s

This commit is contained in:
2026-03-05 08:18:07 -06:00
parent 179180d604
commit c61fe26713
9 changed files with 51 additions and 27 deletions

View File

@@ -1,6 +1,9 @@
import { useCallback } from "react";
import { useQueryClient } from "@tanstack/react-query";
import { useEntityNotifications } from "@/contexts/WebSocketContext";
import {
useEntityNotifications,
type Notification,
} from "@/contexts/WebSocketContext";
import type { EnforcementSummary } from "@/api";
interface UseEnforcementStreamOptions {
@@ -120,7 +123,8 @@ export function useEnforcementStream(
const queryClient = useQueryClient();
const handleNotification = useCallback(
(notification: EnforcementNotification) => {
(raw: Notification) => {
const notification = raw as unknown as EnforcementNotification;
// Filter by enforcement ID if specified
if (enforcementId && notification.entity_id !== enforcementId) {
return;