Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Mar 17, 2020
1 parent 3c1d9cc commit 6f000ef
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ export const SignalsHistogramPanel = memo<SignalsHistogramPanelProps>(
);
}, [selectedStackByOption.value, from, to, query, filters]);

const linkButton = useMemo(() => {
if (showLinkToSignals) {
return (
<ViewSignalsFlexItem grow={false}>
<EuiButton href={getDetectionEngineUrl(urlSearch)}>{i18n.VIEW_SIGNALS}</EuiButton>
</ViewSignalsFlexItem>
);
}
}, [showLinkToSignals, urlSearch]);

return (
<InspectButtonContainer show={!isInitialLoading}>
<StyledEuiPanel height={panelHeight}>
Expand All @@ -213,13 +223,7 @@ export const SignalsHistogramPanel = memo<SignalsHistogramPanelProps>(
/>
)}
</EuiFlexItem>
{showLinkToSignals && (
<ViewSignalsFlexItem grow={false}>
<EuiButton href={getDetectionEngineUrl(urlSearch)}>
{i18n.VIEW_SIGNALS}
</EuiButton>
</ViewSignalsFlexItem>
)}
{linkButton}
</EuiFlexGroup>
</HeaderSection>

Expand Down

0 comments on commit 6f000ef

Please sign in to comment.