Commit 635d544a authored by Yoelis Acourt's avatar Yoelis Acourt

feat: hide web tab in search form

parent 62d5ff14
......@@ -30,6 +30,7 @@ import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Hooks.UseFeatureFlag as Feature
here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField"
......@@ -324,7 +325,16 @@ dataFieldNavCpt = here.component "dataFieldNav" cpt
pure $ R.fragment
[ H.div { className: "text-primary text-bold p-1" } [ H.text "Search options:" ]
, H.div { className: "nav nav-tabs" } ((liItem search') <$> dataFields)
, Feature.feature
{ keys: [ "expert" ]
, render: \shouldRender ->
let
viewTabs d = H.div { className: "nav nav-tabs" } ((liItem search') <$> d)
in
if shouldRender then viewTabs dataFields
-- This hides the web tab in search
else viewTabs $ A.filter (\i -> i /= Web) dataFields
}
, H.div { className: "center p-1" }
[ H.text $ doc datafield
]
......@@ -673,7 +683,7 @@ datafieldInputCpt = here.component "datafieldInput" cpt
else
H.div {} []
, H.div {} [ searchIframes { iframeRef, search } [] ]
, Feature.hide { keys: [ "expert" ], render: H.div {} [ searchIframes { iframeRef, search } [] ] }
]
type SearchInputProps =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment