Commit 481dc3ac authored by Alexandre Delanoë's avatar Alexandre Delanoë

[COSMETICS] reading code.

parent 281327fe
...@@ -62,7 +62,10 @@ data Action ...@@ -62,7 +62,10 @@ data Action
| GO | GO
performAction :: forall eff props. PerformAction (console :: CONSOLE, ajax :: AJAX,dom::DOM | eff) State props Action performAction :: forall eff props. PerformAction ( console :: CONSOLE
, ajax :: AJAX
, dom :: DOM
| eff ) State props Action
performAction NoOp _ _ = void do performAction NoOp _ _ = void do
modifyState id modifyState id
......
...@@ -62,8 +62,7 @@ newtype Response = Response ...@@ -62,8 +62,7 @@ newtype Response = Response
} }
newtype Hyperdata = Hyperdata newtype Hyperdata = Hyperdata
{ { title :: String
title :: String
, source :: String , source :: String
} }
......
...@@ -153,16 +153,14 @@ getDeviseID :: forall eff. Eff (dom :: DOM | eff) (Maybe String) ...@@ -153,16 +153,14 @@ getDeviseID :: forall eff. Eff (dom :: DOM | eff) (Maybe String)
getDeviseID = do getDeviseID = do
w <- window w <- window
ls <- localStorage w ls <- localStorage w
i <- getItem "token" ls getItem "token" ls
pure $ i
setToken :: forall e . String -> Eff (dom :: DOM | e) Unit setToken :: forall e . String -> Eff (dom :: DOM | e) Unit
setToken s = do setToken s = do
w <- window w <- window
ls <- localStorage w ls <- localStorage w
liftEff $ setItem "token" s ls setItem "token" s ls
pure unit
......
...@@ -286,7 +286,7 @@ sidebarnavSpec = simpleSpec performAction render ...@@ -286,7 +286,7 @@ sidebarnavSpec = simpleSpec performAction render
, placeholder "Query, URL or FILE (works with Firefox or Chromium browsers)" , placeholder "Query, URL or FILE (works with Firefox or Chromium browsers)"
, _type "text" , _type "text"
, style { height: "35px" , style { height: "35px"
, width: "450px" , width : "450px"
-- , color: "white" -- , color: "white"
-- , background : "#A1C2D8" -- , background : "#A1C2D8"
} }
...@@ -355,15 +355,12 @@ dispatchAction dispatcher _ DocView = do ...@@ -355,15 +355,12 @@ dispatchAction dispatcher _ DocView = do
_ <- dispatcher $ DocViewA $ DV.LoadData _ <- dispatcher $ DocViewA $ DV.LoadData
pure unit pure unit
dispatchAction dispatcher _ SearchView = do dispatchAction dispatcher _ SearchView = do
_ <- dispatcher $ SetRoute $ SearchView _ <- dispatcher $ SetRoute $ SearchView
_ <- dispatcher $ SearchA $ S.NoOp _ <- dispatcher $ SearchA $ S.NoOp
pure unit pure unit
dispatchAction dispatcher _ UserPage = do dispatchAction dispatcher _ UserPage = do
_ <- dispatcher $ SetRoute $ UserPage _ <- dispatcher $ SetRoute $ UserPage
_ <- dispatcher $ UserPageA $ UP.NoOp _ <- dispatcher $ UserPageA $ UP.NoOp
pure unit pure 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