Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const aboutModalCopyTooltips: [React.ReactNode, React.ReactNode] = [
'Copied!',
]

const DICOM_TAG_BROWSER_PATHS = ['/studies/', '/study/', '/projects/'] as const

const aboutModalStyles: Record<string, React.CSSProperties> = {
container: {
textAlign: 'center',
Expand Down Expand Up @@ -398,7 +400,9 @@ class Header extends React.Component<HeaderProps, HeaderState> {
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
})`,
)
}
}
Expand Down Expand Up @@ -606,8 +610,9 @@ class Header extends React.Component<HeaderProps, HeaderState> {
</Badge>
)

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 ? (
<Button
Expand Down