Skip to content

Commit

Permalink
fix(FOROME-884): hide igv button when we dont have igv-urls for dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
QYaroslavTrefilov committed Apr 19, 2022
1 parent 8bf9c05 commit 8b849ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/variant/ui/drawer-window.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { observer } from 'mobx-react-lite'
import { IGridLayout } from '@declarations'
import { t } from '@i18n'
import { theme } from '@theme'
import dirinfoStore from '@store/dirinfo'
import variantStore from '@store/variant'
import { Icon } from '@ui/icon'
import {
Expand Down Expand Up @@ -63,6 +64,9 @@ export const DrawerWindow = observer(

const isChecked = filterSelection !== DrawerClass.normClass

const igvUrls = dirinfoStore.dsinfo['igv-urls'] as string[] | undefined
const shouldShowIgvBtn = igvUrls && aspect.name === 'view_gen'

return (
<>
<div
Expand Down Expand Up @@ -129,7 +133,7 @@ export const DrawerWindow = observer(
>
<span className="uppercase">{aspect.title}</span>
<div className="flex">
{aspect.name === 'view_gen' && <IgvButton />}
{shouldShowIgvBtn && <IgvButton />}
{shouldShowCheckbox && (
<label
className="mx-8 whitespace-nowrap flex items-center cursor-pointer"
Expand Down

0 comments on commit 8b849ca

Please sign in to comment.