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