Skip to content

Commit

Permalink
hide visualization menu when duplicate variables
Browse files Browse the repository at this point in the history
  • Loading branch information
BulotF committed Sep 21, 2023
1 parent 90fdefe commit 35a3791
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/widgets/visualize-dropdown/components/visualize-dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,21 @@ function VisualizeDropdown({
{Dictionary.visualise}
<span className="caret" />
</button>

<ul className="dropdown-menu">
{links.map(link => {
return (
<li key={link.actionLabel}>
<a href="#" onClick={e => visualize(e, link.actionType)}>
{link.actionLabel}
</a>
</li>
);
})}
</ul>
{!(
allowDuplicateVariablesModal && hasQuestionnaireDuplicateVariables
) && (
<ul className="dropdown-menu">
{links.map(link => {
return (
<li key={link.actionLabel}>
<a href="#" onClick={e => visualize(e, link.actionType)}>
{link.actionLabel}
</a>
</li>
);
})}
</ul>
)}
<ReactModal
isOpen={
allowDuplicateVariablesModal && hasQuestionnaireDuplicateVariables
Expand Down

0 comments on commit 35a3791

Please sign in to comment.