Commit 9607146f authored by Fabien Maniere's avatar Fabien Maniere

uniformize the search tab too

parent 6c92911e
Pipeline #7168 passed with stages
in 18 minutes and 58 seconds
......@@ -9,6 +9,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchBar (searchBar
import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField (defaultSearch)
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Utils (loadLanguages)
import Gargantext.Components.Forest.Tree.Node.Tools as Tools
import Gargantext.Components.Lang (Lang)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude
......@@ -62,20 +63,25 @@ actionSearchWithLangsCpt = here.component "actionSearchWithLangs" cpt
cpt { dispatch, id, langs, session } _ = do
{ errors } <- Store.use
search <- T.useBox $ defaultSearch { node_id = id }
pure $ H.div { className: "card-body toolbox-tab-content px-5 py-4" }
[ H.p { className: "action-search mx-2" }
[ H.text $ "Search and create a private "
<> "corpus with the search query as corpus name."
]
, searchBar
{ errors
, langs
, onSearch: searchOn dispatch
, search
, session
}
[]
]
pure $
Tools.panelNoFooter
{ mError: Nothing
, iconName: "search"
, textTitle: "Search (APIs) and create a corpus"
}
-- H.div { className: "card-body toolbox-tab-content px-5 py-4" }
[ H.div { className: "action-search mx-2" }
[ H.text $ "Please fill the search query and choose a database."
]
, searchBar
{ errors
, langs
, onSearch: searchOn dispatch
, search
, session
}
[]
]
where
searchOn
:: (Action -> Aff Unit)
......
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