Update NotesPanel to Include 'type' in Dependency Array

- Modified the dependency array in the useEffect hook of the NotesPanel component to include 'type', ensuring that the effect re-runs when the type prop changes. This enhances the component's responsiveness to prop updates.
This commit is contained in:
Tom Butcher 2026-08-21 11:08:59 +01:00
parent 802de940ab
commit edf47b7c21

View File

@ -109,7 +109,7 @@ const NotesPanel = ({ _id, type }) => {
subscribeToObjectTypeUpdatesRef.current = null subscribeToObjectTypeUpdatesRef.current = null
} }
} }
}, [_id, subscribeToObjectTypeUpdates, connected, handleReloadData]) }, [_id, type, subscribeToObjectTypeUpdates, connected, handleReloadData])
useEffect(() => { useEffect(() => {
if ( if (