mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2025-01-07 06:53:46 +03:00
Wire in local state to slides template.
This commit is contained in:
parent
8ae7b6689c
commit
881e380a30
@ -13,6 +13,7 @@ import OptimizedDecoder
|
||||
import Pages.ImagePath as ImagePath
|
||||
import Pages.StaticFile as StaticFile
|
||||
import Pages.StaticHttp as StaticHttp
|
||||
import Shared
|
||||
import Template exposing (StaticPayload, Template)
|
||||
|
||||
|
||||
@ -35,7 +36,12 @@ template =
|
||||
, staticRoutes = StaticHttp.succeed [ { number = "1" } ]
|
||||
, staticData = staticData
|
||||
}
|
||||
|> Template.buildNoState { view = view }
|
||||
|> Template.buildWithLocalState
|
||||
{ view = view
|
||||
, init = \routeParams -> ( (), Cmd.none )
|
||||
, update = \sharedModel routeParams msg model -> ( model, Cmd.none )
|
||||
, subscriptions = \routeParams path model -> Sub.none
|
||||
}
|
||||
|
||||
|
||||
staticData : RouteParams -> StaticHttp.Request StaticData
|
||||
@ -122,9 +128,11 @@ type alias StaticData =
|
||||
|
||||
|
||||
view :
|
||||
StaticPayload StaticData RouteParams
|
||||
Model
|
||||
-> Shared.Model
|
||||
-> StaticPayload StaticData RouteParams
|
||||
-> Document Msg
|
||||
view static =
|
||||
view model sharedModel static =
|
||||
{ title = "TODO title"
|
||||
, body = static.static
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user