Skip to content

Commit

Permalink
Charts button hidden if no charts to display
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpeterkort committed Jul 18, 2024
1 parent d10fb30 commit 796825d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/frontend/src/features/CohortBuilder/CohortPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,15 @@ export const CohortPanel = ({
filter={cohortFilters}
/>
<div className="flex justify-between flex-row items-center mb-2">
<Gen3Button
colors="primary"
onClick={() => setShowCharts(!showCharts)}
className="px-2 py-1 text-primary-contrast rounded mr-4 active:scale-95"
>
{showCharts ? 'Hide Charts' : 'Show Charts'}
</Gen3Button>
{Object.keys(summaryCharts).length !== 0 && (
<Gen3Button
colors="primary"
onClick={() => setShowCharts(!showCharts)}
className="px-2 py-1 text-primary-contrast rounded mr-4 active:scale-95"
>
{showCharts ? 'Hide Charts' : 'Show Charts'}
</Gen3Button>
)}
<CountsValue
label={guppyConfig.nodeCountTitle}
counts={counts}
Expand Down

0 comments on commit 796825d

Please sign in to comment.