@adventurelabs/scout-core 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,12 @@
1
1
  "use client";
2
- import { useAppDispatch } from "../store/hooks";
3
2
  import { useSelector } from "react-redux";
4
3
  import { useEffect, useRef, useCallback, useState } from "react";
5
- import { addDevice, deleteDevice, updateDevice } from "../store/scout";
6
4
  import { EnumRealtimeOperation } from "../types/realtime";
7
5
  export function useScoutRealtimeDevices(scoutSupabase) {
8
6
  const channels = useRef([]);
9
- const dispatch = useAppDispatch();
10
7
  const [latestDeviceUpdate, setLatestDeviceUpdate] = useState(null);
11
8
  const activeHerdId = useSelector((state) => state.scout.active_herd_id);
12
- // Device broadcast handler
9
+ // Device broadcast handler - just pass data, don't mutate state
13
10
  const handleDeviceBroadcast = useCallback((payload) => {
14
11
  console.log("[Devices] Broadcast received:", payload.payload.operation);
15
12
  const data = payload.payload;
@@ -20,22 +17,15 @@ export function useScoutRealtimeDevices(scoutSupabase) {
20
17
  switch (data.operation) {
21
18
  case "INSERT":
22
19
  operation = EnumRealtimeOperation.INSERT;
23
- if (data.record) {
24
- console.log("[Devices] New device received:", data.record);
25
- dispatch(addDevice(data.record));
26
- }
20
+ console.log("[Devices] New device received:", data.record);
27
21
  break;
28
22
  case "UPDATE":
29
23
  operation = EnumRealtimeOperation.UPDATE;
30
- if (data.record) {
31
- dispatch(updateDevice(data.record));
32
- }
24
+ console.log("[Devices] Device updated:", data.record);
33
25
  break;
34
26
  case "DELETE":
35
27
  operation = EnumRealtimeOperation.DELETE;
36
- if (data.old_record) {
37
- dispatch(deleteDevice(data.old_record));
38
- }
28
+ console.log("[Devices] Device deleted:", data.old_record);
39
29
  break;
40
30
  default:
41
31
  return;
@@ -46,7 +36,7 @@ export function useScoutRealtimeDevices(scoutSupabase) {
46
36
  };
47
37
  console.log(`[scout-core realtime] DEVICE ${data.operation} received:`, JSON.stringify(realtimeData));
48
38
  setLatestDeviceUpdate(realtimeData);
49
- }, [dispatch]);
39
+ }, []);
50
40
  // Clear latest update
51
41
  const clearLatestUpdate = useCallback(() => {
52
42
  setLatestDeviceUpdate(null);
@@ -2,4 +2,4 @@ import { SupabaseClient } from "@supabase/supabase-js";
2
2
  import { Database } from "../types/supabase";
3
3
  import { IEventAndTagsPrettyLocation } from "../types/db";
4
4
  import { RealtimeData } from "../types/realtime";
5
- export declare function useScoutRealtimeEvents(scoutSupabase: SupabaseClient<Database>, invalidateRTKQuery?: boolean): [RealtimeData<IEventAndTagsPrettyLocation> | null, () => void];
5
+ export declare function useScoutRealtimeEvents(scoutSupabase: SupabaseClient<Database>): [RealtimeData<IEventAndTagsPrettyLocation> | null, () => void];
@@ -1,15 +1,12 @@
1
1
  "use client";
2
- import { useAppDispatch } from "../store/hooks";
3
2
  import { useSelector } from "react-redux";
4
3
  import { useEffect, useRef, useCallback, useState } from "react";
5
4
  import { EnumRealtimeOperation } from "../types/realtime";
6
- import { scoutApi } from "../store/api";
7
- export function useScoutRealtimeEvents(scoutSupabase, invalidateRTKQuery = true) {
5
+ export function useScoutRealtimeEvents(scoutSupabase) {
8
6
  const channels = useRef([]);
9
- const dispatch = useAppDispatch();
10
7
  const [latestEventUpdate, setLatestEventUpdate] = useState(null);
11
8
  const activeHerdId = useSelector((state) => state.scout.active_herd_id);
12
- // Event broadcast handler
9
+ // Event broadcast handler - just pass data, don't mutate state
13
10
  const handleEventBroadcast = useCallback((payload) => {
14
11
  console.log("[Events] Broadcast received:", payload.payload.operation);
15
12
  const data = payload.payload;
@@ -20,30 +17,15 @@ export function useScoutRealtimeEvents(scoutSupabase, invalidateRTKQuery = true)
20
17
  switch (data.operation) {
21
18
  case "INSERT":
22
19
  operation = EnumRealtimeOperation.INSERT;
23
- if (data.record && invalidateRTKQuery) {
24
- console.log("[Events] New event received, invalidating RTK Query cache:", data.record);
25
- // Invalidate all events queries to refetch fresh data
26
- dispatch(scoutApi.util.invalidateTags(["Event"]));
27
- }
20
+ console.log("[Events] New event received:", data.record);
28
21
  break;
29
22
  case "UPDATE":
30
23
  operation = EnumRealtimeOperation.UPDATE;
31
- if (data.record && invalidateRTKQuery) {
32
- console.log("[Events] Event updated, invalidating RTK Query cache:", data.record);
33
- // Invalidate specific event and list queries
34
- dispatch(scoutApi.util.invalidateTags([
35
- { type: "Event", id: data.record.id || "unknown" },
36
- { type: "Event", id: "LIST" },
37
- ]));
38
- }
24
+ console.log("[Events] Event updated:", data.record);
39
25
  break;
40
26
  case "DELETE":
41
27
  operation = EnumRealtimeOperation.DELETE;
42
- if (data.old_record && invalidateRTKQuery) {
43
- console.log("[Events] Event deleted, invalidating RTK Query cache:", data.old_record);
44
- // Invalidate all events queries since item was deleted
45
- dispatch(scoutApi.util.invalidateTags(["Event"]));
46
- }
28
+ console.log("[Events] Event deleted:", data.old_record);
47
29
  break;
48
30
  default:
49
31
  return;
@@ -54,7 +36,7 @@ export function useScoutRealtimeEvents(scoutSupabase, invalidateRTKQuery = true)
54
36
  };
55
37
  console.log(`[scout-core realtime] EVENT ${data.operation} received:`, JSON.stringify(realtimeData));
56
38
  setLatestEventUpdate(realtimeData);
57
- }, [dispatch, invalidateRTKQuery]);
39
+ }, []);
58
40
  // Clear latest update
59
41
  const clearLatestUpdate = useCallback(() => {
60
42
  setLatestEventUpdate(null);
@@ -1,15 +1,12 @@
1
1
  "use client";
2
- import { useAppDispatch } from "../store/hooks";
3
2
  import { useSelector } from "react-redux";
4
3
  import { useEffect, useRef, useCallback, useState } from "react";
5
4
  import { EnumRealtimeOperation } from "../types/realtime";
6
5
  export function useScoutRealtimeParts(scoutSupabase) {
7
6
  const channels = useRef([]);
8
- const dispatch = useAppDispatch();
9
7
  const [latestPartUpdate, setLatestPartUpdate] = useState(null);
10
8
  const activeHerdId = useSelector((state) => state.scout.active_herd_id);
11
- const herdModules = useSelector((state) => state.scout.herd_modules);
12
- // Part broadcast handler
9
+ // Part broadcast handler - just pass data, don't mutate state
13
10
  const handlePartBroadcast = useCallback((payload) => {
14
11
  console.log("[Parts] Broadcast received:", payload.payload.operation);
15
12
  const data = payload.payload;
@@ -17,55 +14,18 @@ export function useScoutRealtimeParts(scoutSupabase) {
17
14
  if (!partData)
18
15
  return;
19
16
  let operation;
20
- // Find the target herd module and device
21
- const herdModule = herdModules.find((hm) => hm.herd.id.toString() === activeHerdId);
22
- if (!herdModule) {
23
- console.warn("[Parts] No herd module found for active herd");
24
- return;
25
- }
26
- const targetDevice = herdModule.devices.find((device) => device.id === partData.device_id);
27
- if (!targetDevice) {
28
- console.warn(`[Parts] No device found with ID: ${partData.device_id}`);
29
- return;
30
- }
31
- // Ensure device has parts array
32
- if (!targetDevice.parts) {
33
- targetDevice.parts = [];
34
- }
35
17
  switch (data.operation) {
36
18
  case "INSERT":
37
19
  operation = EnumRealtimeOperation.INSERT;
38
- if (data.record) {
39
- console.log("[Parts] New part received:", data.record);
40
- // Add part to device's parts array if not already present
41
- const existingPartIndex = targetDevice.parts.findIndex((p) => p.id === data.record.id);
42
- if (existingPartIndex === -1) {
43
- targetDevice.parts.push(data.record);
44
- }
45
- }
20
+ console.log("[Parts] New part received:", data.record);
46
21
  break;
47
22
  case "UPDATE":
48
23
  operation = EnumRealtimeOperation.UPDATE;
49
- if (data.record) {
50
- console.log("[Parts] Part updated:", data.record);
51
- // Update existing part in device's parts array
52
- const partIndex = targetDevice.parts.findIndex((p) => p.id === data.record.id);
53
- if (partIndex !== -1) {
54
- targetDevice.parts[partIndex] = data.record;
55
- }
56
- else {
57
- // Part not found, add it
58
- targetDevice.parts.push(data.record);
59
- }
60
- }
24
+ console.log("[Parts] Part updated:", data.record);
61
25
  break;
62
26
  case "DELETE":
63
27
  operation = EnumRealtimeOperation.DELETE;
64
- if (data.old_record) {
65
- console.log("[Parts] Part deleted:", data.old_record);
66
- // Remove part from device's parts array
67
- targetDevice.parts = targetDevice.parts.filter((p) => p.id !== data.old_record.id);
68
- }
28
+ console.log("[Parts] Part deleted:", data.old_record);
69
29
  break;
70
30
  default:
71
31
  return;
@@ -76,7 +36,7 @@ export function useScoutRealtimeParts(scoutSupabase) {
76
36
  };
77
37
  console.log(`[scout-core realtime] PART ${data.operation} received:`, JSON.stringify(realtimeData));
78
38
  setLatestPartUpdate(realtimeData);
79
- }, [dispatch, activeHerdId, herdModules]);
39
+ }, []);
80
40
  // Clear latest update
81
41
  const clearLatestUpdate = useCallback(() => {
82
42
  setLatestPartUpdate(null);
@@ -2,4 +2,4 @@ import { SupabaseClient } from "@supabase/supabase-js";
2
2
  import { Database } from "../types/supabase";
3
3
  import { IPin } from "../types/db";
4
4
  import { RealtimeData } from "../types/realtime";
5
- export declare function useScoutRealtimePins(scoutSupabase: SupabaseClient<Database>, shouldUpdateGlobalStateOnChanges?: boolean): [RealtimeData<IPin> | null, () => void];
5
+ export declare function useScoutRealtimePins(scoutSupabase: SupabaseClient<Database>): [RealtimeData<IPin> | null, () => void];
@@ -2,11 +2,11 @@
2
2
  import { useSelector } from "react-redux";
3
3
  import { useEffect, useRef, useCallback, useState } from "react";
4
4
  import { EnumRealtimeOperation } from "../types/realtime";
5
- export function useScoutRealtimePins(scoutSupabase, shouldUpdateGlobalStateOnChanges) {
5
+ export function useScoutRealtimePins(scoutSupabase) {
6
6
  const channels = useRef([]);
7
7
  const [latestPinUpdate, setLatestPinUpdate] = useState(null);
8
8
  const activeHerdId = useSelector((state) => state.scout.active_herd_id);
9
- // Pin broadcast handler
9
+ // Pin broadcast handler - just pass data, don't mutate state
10
10
  const handlePinBroadcast = useCallback((payload) => {
11
11
  console.log("[Pins] Broadcast received:", payload.payload.operation);
12
12
  const data = payload.payload;
@@ -17,22 +17,15 @@ export function useScoutRealtimePins(scoutSupabase, shouldUpdateGlobalStateOnCha
17
17
  switch (data.operation) {
18
18
  case "INSERT":
19
19
  operation = EnumRealtimeOperation.INSERT;
20
- if (data.record && shouldUpdateGlobalStateOnChanges) {
21
- console.log("[Pins] New pin received:", data.record);
22
- // TODO: dispatch(addPinToStore(data.record));
23
- }
20
+ console.log("[Pins] New pin received:", data.record);
24
21
  break;
25
22
  case "UPDATE":
26
23
  operation = EnumRealtimeOperation.UPDATE;
27
- if (data.record && shouldUpdateGlobalStateOnChanges) {
28
- // TODO: dispatch(updatePinInStore(data.record));
29
- }
24
+ console.log("[Pins] Pin updated:", data.record);
30
25
  break;
31
26
  case "DELETE":
32
27
  operation = EnumRealtimeOperation.DELETE;
33
- if (data.old_record && shouldUpdateGlobalStateOnChanges) {
34
- // TODO: dispatch(deletePinFromStore(data.old_record));
35
- }
28
+ console.log("[Pins] Pin deleted:", data.old_record);
36
29
  break;
37
30
  default:
38
31
  return;
@@ -43,7 +36,7 @@ export function useScoutRealtimePins(scoutSupabase, shouldUpdateGlobalStateOnCha
43
36
  };
44
37
  console.log(`[scout-core realtime] PIN ${data.operation} received for pin "${pinData.name}" (${pinData.id}):`, JSON.stringify(realtimeData));
45
38
  setLatestPinUpdate(realtimeData);
46
- }, [shouldUpdateGlobalStateOnChanges]);
39
+ }, []);
47
40
  // Clear latest update
48
41
  const clearLatestUpdate = useCallback(() => {
49
42
  setLatestPinUpdate(null);
@@ -2,4 +2,4 @@ import { SupabaseClient } from "@supabase/supabase-js";
2
2
  import { Database } from "../types/supabase";
3
3
  import { IPlan } from "../types/db";
4
4
  import { RealtimeData } from "../types/realtime";
5
- export declare function useScoutRealtimePlans(scoutSupabase: SupabaseClient<Database>, shouldUpdateGlobalStateOnChanges: boolean): [RealtimeData<IPlan> | null, () => void];
5
+ export declare function useScoutRealtimePlans(scoutSupabase: SupabaseClient<Database>): [RealtimeData<IPlan> | null, () => void];
@@ -1,15 +1,12 @@
1
1
  "use client";
2
- import { useAppDispatch } from "../store/hooks";
3
2
  import { useSelector } from "react-redux";
4
3
  import { useEffect, useRef, useCallback, useState } from "react";
5
- import { addPlan, deletePlan, updatePlan } from "../store/scout";
6
4
  import { EnumRealtimeOperation } from "../types/realtime";
7
- export function useScoutRealtimePlans(scoutSupabase, shouldUpdateGlobalStateOnChanges) {
5
+ export function useScoutRealtimePlans(scoutSupabase) {
8
6
  const channels = useRef([]);
9
- const dispatch = useAppDispatch();
10
7
  const [latestPlanUpdate, setLatestPlanUpdate] = useState(null);
11
8
  const activeHerdId = useSelector((state) => state.scout.active_herd_id);
12
- // Plan broadcast handler
9
+ // Plan broadcast handler - just pass data, don't mutate state
13
10
  const handlePlanBroadcast = useCallback((payload) => {
14
11
  console.log("[Plans] Broadcast received:", payload.payload.operation);
15
12
  const data = payload.payload;
@@ -20,22 +17,15 @@ export function useScoutRealtimePlans(scoutSupabase, shouldUpdateGlobalStateOnCh
20
17
  switch (data.operation) {
21
18
  case "INSERT":
22
19
  operation = EnumRealtimeOperation.INSERT;
23
- if (data.record && shouldUpdateGlobalStateOnChanges) {
24
- console.log("[Plans] New plan received:", data.record);
25
- dispatch(addPlan(data.record));
26
- }
20
+ console.log("[Plans] New plan received:", data.record);
27
21
  break;
28
22
  case "UPDATE":
29
23
  operation = EnumRealtimeOperation.UPDATE;
30
- if (data.record && shouldUpdateGlobalStateOnChanges) {
31
- dispatch(updatePlan(data.record));
32
- }
24
+ console.log("[Plans] Plan updated:", data.record);
33
25
  break;
34
26
  case "DELETE":
35
27
  operation = EnumRealtimeOperation.DELETE;
36
- if (data.old_record && shouldUpdateGlobalStateOnChanges) {
37
- dispatch(deletePlan(data.old_record));
38
- }
28
+ console.log("[Plans] Plan deleted:", data.old_record);
39
29
  break;
40
30
  default:
41
31
  return;
@@ -46,7 +36,7 @@ export function useScoutRealtimePlans(scoutSupabase, shouldUpdateGlobalStateOnCh
46
36
  };
47
37
  console.log(`[scout-core realtime] PLAN ${data.operation} received:`, JSON.stringify(realtimeData));
48
38
  setLatestPlanUpdate(realtimeData);
49
- }, [dispatch]);
39
+ }, []);
50
40
  // Clear latest update
51
41
  const clearLatestUpdate = useCallback(() => {
52
42
  setLatestPlanUpdate(null);
@@ -2,4 +2,4 @@ import { SupabaseClient } from "@supabase/supabase-js";
2
2
  import { Database } from "../types/supabase";
3
3
  import { ISessionWithCoordinates } from "../types/db";
4
4
  import { RealtimeData } from "../types/realtime";
5
- export declare function useScoutRealtimeSessions(scoutSupabase: SupabaseClient<Database>, invalidateRTKQuery?: boolean): [RealtimeData<ISessionWithCoordinates> | null, () => void];
5
+ export declare function useScoutRealtimeSessions(scoutSupabase: SupabaseClient<Database>): [RealtimeData<ISessionWithCoordinates> | null, () => void];
@@ -1,15 +1,12 @@
1
1
  "use client";
2
2
  import { useSelector } from "react-redux";
3
- import { useAppDispatch } from "../store/hooks";
4
3
  import { useEffect, useRef, useCallback, useState } from "react";
5
4
  import { EnumRealtimeOperation } from "../types/realtime";
6
- import { scoutApi } from "../store/api";
7
- export function useScoutRealtimeSessions(scoutSupabase, invalidateRTKQuery = true) {
5
+ export function useScoutRealtimeSessions(scoutSupabase) {
8
6
  const channels = useRef([]);
9
- const dispatch = useAppDispatch();
10
7
  const [latestSessionUpdate, setLatestSessionUpdate] = useState(null);
11
8
  const activeHerdId = useSelector((state) => state.scout.active_herd_id);
12
- // Session broadcast handler
9
+ // Session broadcast handler - just pass data, don't mutate state
13
10
  const handleSessionBroadcast = useCallback((payload) => {
14
11
  console.log("[Sessions] Broadcast received:", payload.payload.operation);
15
12
  const data = payload.payload;
@@ -20,30 +17,15 @@ export function useScoutRealtimeSessions(scoutSupabase, invalidateRTKQuery = tru
20
17
  switch (data.operation) {
21
18
  case "INSERT":
22
19
  operation = EnumRealtimeOperation.INSERT;
23
- if (data.record && invalidateRTKQuery) {
24
- console.log("[Sessions] New session received, invalidating RTK Query cache:", data.record);
25
- // Invalidate all sessions queries to refetch fresh data
26
- dispatch(scoutApi.util.invalidateTags(["Session"]));
27
- }
20
+ console.log("[Sessions] New session received:", data.record);
28
21
  break;
29
22
  case "UPDATE":
30
23
  operation = EnumRealtimeOperation.UPDATE;
31
- if (data.record && invalidateRTKQuery) {
32
- console.log("[Sessions] Session updated, invalidating RTK Query cache:", data.record);
33
- // Invalidate specific session and list queries
34
- dispatch(scoutApi.util.invalidateTags([
35
- { type: "Session", id: data.record.id || "unknown" },
36
- { type: "Session", id: "LIST" },
37
- ]));
38
- }
24
+ console.log("[Sessions] Session updated:", data.record);
39
25
  break;
40
26
  case "DELETE":
41
27
  operation = EnumRealtimeOperation.DELETE;
42
- if (data.old_record && invalidateRTKQuery) {
43
- console.log("[Sessions] Session deleted, invalidating RTK Query cache:", data.old_record);
44
- // Invalidate all sessions queries since item was deleted
45
- dispatch(scoutApi.util.invalidateTags(["Session"]));
46
- }
28
+ console.log("[Sessions] Session deleted:", data.old_record);
47
29
  break;
48
30
  default:
49
31
  return;
@@ -54,7 +36,7 @@ export function useScoutRealtimeSessions(scoutSupabase, invalidateRTKQuery = tru
54
36
  };
55
37
  console.log(`[scout-core realtime] SESSION ${data.operation} received:`, JSON.stringify(realtimeData));
56
38
  setLatestSessionUpdate(realtimeData);
57
- }, [invalidateRTKQuery, dispatch]);
39
+ }, []);
58
40
  // Clear latest update
59
41
  const clearLatestUpdate = useCallback(() => {
60
42
  setLatestSessionUpdate(null);
@@ -86,6 +68,6 @@ export function useScoutRealtimeSessions(scoutSupabase, invalidateRTKQuery = tru
86
68
  channels.current.push(channel);
87
69
  }
88
70
  return cleanupChannels;
89
- }, [activeHerdId, clearLatestUpdate, handleSessionBroadcast]);
71
+ }, [activeHerdId, clearLatestUpdate]);
90
72
  return [latestSessionUpdate, clearLatestUpdate];
91
73
  }
@@ -2,4 +2,4 @@ import { SupabaseClient } from "@supabase/supabase-js";
2
2
  import { Database } from "../types/supabase";
3
3
  import { ITagPrettyLocation } from "../types/db";
4
4
  import { RealtimeData } from "../types/realtime";
5
- export declare function useScoutRealtimeTags(scoutSupabase: SupabaseClient<Database>, invalidateRTKQuery?: boolean): [RealtimeData<ITagPrettyLocation> | null, () => void];
5
+ export declare function useScoutRealtimeTags(scoutSupabase: SupabaseClient<Database>): [RealtimeData<ITagPrettyLocation> | null, () => void];
@@ -1,15 +1,12 @@
1
1
  "use client";
2
- import { useAppDispatch } from "../store/hooks";
3
2
  import { useSelector } from "react-redux";
4
3
  import { useEffect, useRef, useCallback, useState } from "react";
5
4
  import { EnumRealtimeOperation } from "../types/realtime";
6
- import { scoutApi } from "../store/api";
7
- export function useScoutRealtimeTags(scoutSupabase, invalidateRTKQuery = true) {
5
+ export function useScoutRealtimeTags(scoutSupabase) {
8
6
  const channels = useRef([]);
9
- const dispatch = useAppDispatch();
10
7
  const [latestTagUpdate, setLatestTagUpdate] = useState(null);
11
8
  const activeHerdId = useSelector((state) => state.scout.active_herd_id);
12
- // Tag broadcast handler
9
+ // Tag broadcast handler - just pass data, don't mutate state
13
10
  const handleTagBroadcast = useCallback((payload) => {
14
11
  console.log("[Tags] Broadcast received:", payload.payload.operation);
15
12
  const data = payload.payload;
@@ -20,27 +17,15 @@ export function useScoutRealtimeTags(scoutSupabase, invalidateRTKQuery = true) {
20
17
  switch (data.operation) {
21
18
  case "INSERT":
22
19
  operation = EnumRealtimeOperation.INSERT;
23
- if (data.record && invalidateRTKQuery) {
24
- console.log("[Tags] New tag received, invalidating RTK Query cache:", data.record);
25
- // Tags are part of events, so invalidate events queries
26
- dispatch(scoutApi.util.invalidateTags(["Event"]));
27
- }
20
+ console.log("[Tags] New tag received:", data.record);
28
21
  break;
29
22
  case "UPDATE":
30
23
  operation = EnumRealtimeOperation.UPDATE;
31
- if (data.record && invalidateRTKQuery) {
32
- console.log("[Tags] Tag updated, invalidating RTK Query cache:", data.record);
33
- // Invalidate events queries since tags are embedded in events
34
- dispatch(scoutApi.util.invalidateTags(["Event"]));
35
- }
24
+ console.log("[Tags] Tag updated:", data.record);
36
25
  break;
37
26
  case "DELETE":
38
27
  operation = EnumRealtimeOperation.DELETE;
39
- if (data.old_record && invalidateRTKQuery) {
40
- console.log("[Tags] Tag deleted, invalidating RTK Query cache:", data.old_record);
41
- // Invalidate events queries since tags are embedded in events
42
- dispatch(scoutApi.util.invalidateTags(["Event"]));
43
- }
28
+ console.log("[Tags] Tag deleted:", data.old_record);
44
29
  break;
45
30
  default:
46
31
  return;
@@ -51,7 +36,7 @@ export function useScoutRealtimeTags(scoutSupabase, invalidateRTKQuery = true) {
51
36
  };
52
37
  console.log(`[scout-core realtime] TAG ${data.operation} received:`, JSON.stringify(realtimeData));
53
38
  setLatestTagUpdate(realtimeData);
54
- }, [dispatch, invalidateRTKQuery]);
39
+ }, []);
55
40
  // Clear latest update
56
41
  const clearLatestUpdate = useCallback(() => {
57
42
  setLatestTagUpdate(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Core utilities and helpers for Adventure Labs Scout applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",