Skip to content

Commit

Permalink
refactor: rewrite condition for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Mar 2, 2023
1 parent b857e9c commit 010be92
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ViewAsMenuItems = ({

return (
<>
{activeType !== CHART && activeType !== EVENT_CHART && (
{![CHART, EVENT_CHART].includes(activeType) && (
<MenuItem
tooltip={
notSupported
Expand All @@ -48,9 +48,7 @@ const ViewAsMenuItems = ({
icon={<IconVisualizationColumn16 />}
/>
)}
{activeType !== REPORT_TABLE &&
activeType !== EVENT_REPORT &&
activeType !== EVENT_VISUALIZATION && (
{![REPORT_TABLE, EVENT_REPORT, EVENT_VISUALIZATION].includes(activeType) && (
<MenuItem
tooltip={
notSupported
Expand Down

0 comments on commit 010be92

Please sign in to comment.