From 9ff2b2cd78cd5ca2609b41c723cde14d740e387f Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com> Date: Thu, 6 Feb 2020 19:21:40 -0500 Subject: [PATCH] fix detetections tabs --- .../public/components/link_to/link_to.tsx | 2 -- .../detection_engine/detection_engine.tsx | 35 ++++++------------- 2 files changed, 11 insertions(+), 26 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx b/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx index 3eda945c9224e..dc8c696301611 100644 --- a/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx +++ b/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx @@ -62,13 +62,11 @@ export const LinkToPage = React.memo(({ match }) => ( component={RedirectToDetectionEnginePage} exact path={`${match.url}/:pageName(${SiemPageName.detections})`} - strict /> = ({ filters, @@ -98,24 +103,6 @@ const DetectionEnginePageComponent: React.FC [setAbsoluteRangeDatePicker] ); - const tabs = useMemo( - () => ( - - {detectionsTabs.map(tab => ( - - {tab.name} - - ))} - - ), - [detectionsTabs, tabName] - ); - const indexToAdd = useMemo(() => (signalIndexName == null ? [] : [signalIndexName]), [ signalIndexName, ]); @@ -169,7 +156,7 @@ const DetectionEnginePageComponent: React.FC {({ to, from, deleteQuery, setQuery }) => ( <> - {tabs} + {tabName === DetectionEngineTab.signals && ( <>