missing useEffect unsubscribe
This commit is contained in:
parent
069fc3fa74
commit
1c45d643ac
@ -92,7 +92,7 @@ export default function ModeRoute({
|
|||||||
|
|
||||||
// TODO: This should be baked into core, not manuel?
|
// TODO: This should be baked into core, not manuel?
|
||||||
// DisplaySetService would wire this up?
|
// DisplaySetService would wire this up?
|
||||||
DicomMetadataStore.subscribe(
|
const { unsubscribe } = DicomMetadataStore.subscribe(
|
||||||
DicomMetadataStore.EVENTS.INSTANCES_ADDED,
|
DicomMetadataStore.EVENTS.INSTANCES_ADDED,
|
||||||
({ StudyInstanceUID, SeriesInstanceUID }) => {
|
({ StudyInstanceUID, SeriesInstanceUID }) => {
|
||||||
const seriesMetadata = DicomMetadataStore.getSeries(
|
const seriesMetadata = DicomMetadataStore.getSeries(
|
||||||
@ -107,6 +107,8 @@ export default function ModeRoute({
|
|||||||
StudyInstanceUIDsAsArray.forEach(StudyInstanceUID => {
|
StudyInstanceUIDsAsArray.forEach(StudyInstanceUID => {
|
||||||
dataSource.retrieveSeriesMetadata({ StudyInstanceUID });
|
dataSource.retrieveSeriesMetadata({ StudyInstanceUID });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return unsubscribe;
|
||||||
}, [
|
}, [
|
||||||
mode,
|
mode,
|
||||||
dataSourceName,
|
dataSourceName,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user