Commit fc4ddefb authored by Yoelis Acourt's avatar Yoelis Acourt

fix: types mess

parent 613e9cc4
Pipeline #7085 passed with stages
in 17 minutes and 20 seconds
...@@ -84,7 +84,7 @@ actionSearchWithLangsCpt = here.component "actionSearchWithLangs" cpt ...@@ -84,7 +84,7 @@ actionSearchWithLangsCpt = here.component "actionSearchWithLangs" cpt
where where
searchOn searchOn
:: (Action -> Aff Unit) :: (Action -> Aff Unit)
-> GT.AsyncTaskWithType -> GAT.Task
-> Effect Unit -> Effect Unit
searchOn dispatch' task = do searchOn dispatch' task = do
_ <- launchAff $ dispatch' (DoSearch task) _ <- launchAff $ dispatch' (DoSearch task)
......
...@@ -12,6 +12,7 @@ import Data.Set as Set ...@@ -12,6 +12,7 @@ import Data.Set as Set
import Data.String.Common (joinWith) import Data.String.Common (joinWith)
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
import Effect (Effect) import Effect (Effect)
import Gargantext.AsyncTasks as GAT
import Effect.Aff (launchAff_) import Effect.Aff (launchAff_)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Gargantext.Components.Bootstrap (formInput) import Gargantext.Components.Bootstrap (formInput)
...@@ -58,7 +59,7 @@ type Props = ...@@ -58,7 +59,7 @@ type Props =
, errors :: T.Box (Array FrontendError) , errors :: T.Box (Array FrontendError)
, langs :: Array Lang , langs :: Array Lang
-- State hook for a search, how we get data in and out -- State hook for a search, how we get data in and out
, onSearch :: GT.AsyncTaskWithType -> Effect Unit , onSearch :: GAT.Task -> Effect Unit
, search :: T.Box Search , search :: T.Box Search
, session :: Session , session :: Session
) )
...@@ -709,7 +710,7 @@ searchInputCpt = here.component "searchInput" cpt ...@@ -709,7 +710,7 @@ searchInputCpt = here.component "searchInput" cpt
type SubmitButtonProps = type SubmitButtonProps =
( errors :: T.Box (Array FrontendError) ( errors :: T.Box (Array FrontendError)
, onSearch :: GT.AsyncTaskWithType -> Effect Unit , onSearch :: GAT.Task -> Effect Unit
, search :: T.Box Search , search :: T.Box Search
, selection :: T.Box ListSelection.Selection , selection :: T.Box ListSelection.Selection
, session :: Session , session :: Session
...@@ -744,14 +745,14 @@ submitButtonComponent = here.component "submitButton" cpt ...@@ -744,14 +745,14 @@ submitButtonComponent = here.component "submitButton" cpt
type TriggerSearch = type TriggerSearch =
( errors :: T.Box (Array FrontendError) ( errors :: T.Box (Array FrontendError)
, onSearch :: GT.AsyncTaskWithType -> Effect Unit , onSearch :: GAT.Task -> Effect Unit
, search :: T.Box Search , search :: T.Box Search
, selection :: T.Box ListSelection.Selection , selection :: T.Box ListSelection.Selection
, session :: Session , session :: Session
) )
triggerSearch triggerSearch
:: { onSearch :: (GT.AsyncTaskWithType -> Effect Unit) :: { onSearch :: (GAT.Task -> Effect Unit)
, errors :: T.Box (Array FrontendError) , errors :: T.Box (Array FrontendError)
, session :: Session , session :: Session
, selection :: ListSelection.Selection , selection :: ListSelection.Selection
......
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