diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 0ce26fcd..c6607c0e 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -43,6 +43,8 @@ const aboutModalCopyTooltips: [React.ReactNode, React.ReactNode] = [ 'Copied!', ] +const DICOM_TAG_BROWSER_PATHS = ['/studies/', '/study/', '/projects/'] as const + const aboutModalStyles: Record = { container: { textAlign: 'center', @@ -398,7 +400,9 @@ class Header extends React.Component { for (let i = 0; i < errorNum; i++) { const category = this.state.errorCategory[i] as ObjectKey errorMsgs[category].push( - `${this.state.errorObj[i].message as string} (Source: ${this.state.errorObj[i].source})`, + `${this.state.errorObj[i].message as string} (Source: ${ + this.state.errorObj[i].source + })`, ) } } @@ -606,8 +610,9 @@ class Header extends React.Component { ) - const showDicomTagBrowser = - this.props.location.pathname.includes('/studies/') + const showDicomTagBrowser = DICOM_TAG_BROWSER_PATHS.some((path) => + this.props.location.pathname.includes(path), + ) const dicomTagBrowserButton = showDicomTagBrowser ? (