mirror of
https://github.com/ryannhg/elm-spa.git
synced 2024-11-22 09:44:55 +03:00
move transition into routing record
This commit is contained in:
parent
44cf861672
commit
1eb7e7688b
@ -9,10 +9,10 @@ import Layout as Layout
|
||||
main : Application () Pages.Model Pages.Msg
|
||||
main =
|
||||
Application.create
|
||||
{ transition = Application.fade 200
|
||||
, routing =
|
||||
{ routing =
|
||||
{ fromUrl = Route.fromUrl
|
||||
, toPath = Route.toPath
|
||||
, transition = Application.fade 200
|
||||
}
|
||||
, layout =
|
||||
{ view = Layout.view
|
||||
|
@ -53,8 +53,8 @@ create :
|
||||
{ routing :
|
||||
{ fromUrl : Url -> route
|
||||
, toPath : route -> String
|
||||
, transition : Transition (Html msg)
|
||||
}
|
||||
, transition : Transition (Html msg)
|
||||
, layout :
|
||||
{ view : { page : Html msg } -> Html msg
|
||||
}
|
||||
@ -68,7 +68,7 @@ create :
|
||||
create config =
|
||||
let
|
||||
transition =
|
||||
unwrap config.transition
|
||||
unwrap config.routing.transition
|
||||
in
|
||||
Browser.application
|
||||
{ init =
|
||||
|
Loading…
Reference in New Issue
Block a user