arrow bois

This commit is contained in:
Ryan Haskell-Glatz 2019-10-15 23:57:13 -05:00
parent fe048e5d83
commit 6dae16d7eb

View File

@ -98,17 +98,12 @@ init :
-> Nav.Key
-> ( Model flags model, Cmd (Msg msg) )
init config flags url key =
let
( page, cmd ) =
url |> config.fromUrl |> config.init
in
( { flags = flags
, url = url
, key = key
, page = page
}
, Cmd.map Page cmd
)
url
|> config.fromUrl
|> config.init
|> Tuple.mapBoth
(\page -> { flags = flags, url = url, key = key, page = page })
(Cmd.map Page)
@ -132,16 +127,12 @@ update :
update config msg model =
case msg of
Url url ->
let
( page, cmd ) =
url |> config.fromUrl |> config.init
in
( { model
| url = url
, page = page
}
, Cmd.map Page cmd
)
url
|> config.fromUrl
|> config.init
|> Tuple.mapBoth
(\page -> { model | url = url, page = page })
(Cmd.map Page)
Link (Browser.Internal url) ->
( model