Skip to content

Commit

Permalink
fix(thumbnail): useCallback for thumbnail promise creation.
Browse files Browse the repository at this point in the history
On the worklist page, indicate the number of studies with a colon for better localization.
  • Loading branch information
Joe Boccanfuso committed Oct 31, 2023
1 parent c73a403 commit ce2ba6e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
7 changes: 5 additions & 2 deletions extensions/default/src/Panels/WrappedPanelStudyBrowser.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useCallback } from 'react';
import PropTypes from 'prop-types';
//
import PanelStudyBrowser from './PanelStudyBrowser';
Expand All @@ -18,7 +18,10 @@ function WrappedPanelStudyBrowser({ commandsManager, extensionManager, servicesM
// already determined our datasource
const dataSource = extensionManager.getDataSources()[0];
const _getStudiesForPatientByMRN = getStudiesForPatientByMRN.bind(null, dataSource);
const _getImageSrcFromImageId = _createGetImageSrcFromImageIdFn(extensionManager);
const _getImageSrcFromImageId = useCallback(
_createGetImageSrcFromImageIdFn(extensionManager),
[]
);
const _requestDisplaySetCreationForStudy = requestDisplaySetCreationForStudy.bind(
null,
dataSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useCallback } from 'react';
import PropTypes from 'prop-types';
//
import PanelStudyBrowserTracking from './PanelStudyBrowserTracking';
Expand Down Expand Up @@ -26,7 +26,10 @@ function WrappedPanelStudyBrowserTracking({ commandsManager, extensionManager, s

const getStudiesForPatientByMRN = _getStudyForPatientUtility(extensionManager);
const _getStudiesForPatientByMRN = getStudiesForPatientByMRN.bind(null, dataSource);
const _getImageSrcFromImageId = _createGetImageSrcFromImageIdFn(extensionManager);
const _getImageSrcFromImageId = useCallback(
_createGetImageSrcFromImageIdFn(extensionManager),
[]
);
const _requestDisplaySetCreationForStudy = requestDisplaySetCreationForStudy.bind(
null,
dataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ const StudyListFilter = ({
)}
<Typography
variant="h6"
className="mr-2"
data-cy={'num-studies'}
className="text-primary-light"
>
{numOfStudies > 100 ? '>100' : numOfStudies}
{`${t('Studies')}:`}&nbsp;
</Typography>
<Typography
variant="h6"
className="text-primary-light"
data-cy={'num-studies'}
>
{t('Studies')}
{numOfStudies > 100 ? '>100' : numOfStudies}
</Typography>
</div>
</div>
Expand Down

0 comments on commit ce2ba6e

Please sign in to comment.