Very slight code simplification.
This commit is contained in:
parent
dc523d0c5f
commit
e44b1aebe9
@ -10,7 +10,7 @@ import App.AuthenticationForm as AF
|
||||
import App.OriginalInterface as OI
|
||||
import Halogen as H
|
||||
import Halogen.HTML as HH
|
||||
import Halogen.HTML.Events as HE
|
||||
-- import Halogen.HTML.Events as HE
|
||||
import Halogen.HTML.Properties as HP
|
||||
import Type.Proxy (Proxy(..))
|
||||
import Effect.Aff.Class (class MonadAff)
|
||||
@ -74,6 +74,7 @@ render state = HH.div_ $
|
||||
[ HP.class_ (H.ClassName "box") ]
|
||||
[ HH.p_ [ HH.text ("Token is: " <> current_token) ] ]
|
||||
|
||||
render_original_interface :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||
render_original_interface =
|
||||
HH.div
|
||||
[ HP.class_ (H.ClassName "box") ]
|
||||
@ -113,10 +114,7 @@ render state = HH.div_ $
|
||||
|
||||
handleAction :: forall o monad. MonadAff monad => Action -> H.HalogenM State Action ChildSlots o monad Unit
|
||||
handleAction = case _ of
|
||||
Authenticated authaction -> case authaction of
|
||||
AF.AuthToken newtoken -> do
|
||||
-- TODO: do something more.
|
||||
H.modify_ _ { token = Just newtoken }
|
||||
Authenticated (AF.AuthToken newtoken) -> H.modify_ _ { token = Just newtoken }
|
||||
ReadStates -> do
|
||||
{ token } <- H.get
|
||||
a <- H.request _a unit CA.IsOn
|
||||
|
Loading…
Reference in New Issue
Block a user