Use wildcard for update function for now.

This commit is contained in:
Dillon Kearns 2020-08-23 07:34:09 -07:00
parent 56028a1d41
commit 0ce57d2750
3 changed files with 25 additions and 48 deletions

View File

@ -268,9 +268,6 @@ init maybePagePath =
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
MsgBlogPost msg_ ->
( model, Cmd.none )
MsgGlobal msg_ ->
let
( globalModel, globalCmd ) =
@ -289,20 +286,26 @@ update msg model =
, metadata = record.metadata
}
MsgBlogIndex msg_ ->
let
( updatedPageModel, pageCmd ) =
case model.page of
ModelBlogIndex pageModel ->
Template.BlogIndex.template.update (Debug.todo "")
msg_
pageModel
|> Tuple.mapBoth ModelBlogIndex (Cmd.map MsgBlogIndex)
_ ->
( model, Cmd.none )
_ ->
( model.page, Cmd.none )
in
( { model | page = updatedPageModel }, pageCmd )
-- TODO need to change Debug.todo with the page's metadata, but it's not wired through by the internals yet.
--MsgBlogIndex msg_ ->
-- let
-- ( updatedPageModel, pageCmd ) =
-- case model.page of
-- ModelBlogIndex pageModel ->
-- Template.BlogIndex.template.update (Debug.todo "")
-- msg_
-- pageModel
-- |> Tuple.mapBoth ModelBlogIndex (Cmd.map MsgBlogIndex)
--
-- _ ->
-- ( model.page, Cmd.none )
-- in
-- ( { model | page = updatedPageModel }, pageCmd )
mainTemplate { documents, manifest, canonicalSiteUrl } =

View File

@ -131,9 +131,6 @@ init maybePagePath =
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
MsgBlogPost msg_ ->
( model, Cmd.none )
MsgGlobal msg_ ->
let
( globalModel, globalCmd ) =
@ -152,20 +149,10 @@ update msg model =
, metadata = record.metadata
}
MsgBlogIndex msg_ ->
let
( updatedPageModel, pageCmd ) =
case model.page of
ModelBlogIndex pageModel ->
Template.BlogIndex.template.update (Debug.todo "")
msg_
pageModel
|> Tuple.mapBoth ModelBlogIndex (Cmd.map MsgBlogIndex)
_ ->
-- not implemented yet
( model, Cmd.none )
_ ->
( model.page, Cmd.none )
in
( { model | page = updatedPageModel }, pageCmd )
mainTemplate { documents, manifest, canonicalSiteUrl } =

View File

@ -417,9 +417,6 @@ init maybePagePath =
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
MsgBlogPost msg_ ->
( model, Cmd.none )
MsgGlobal msg_ ->
let
( globalModel, globalCmd ) =
@ -438,20 +435,10 @@ update msg model =
, metadata = record.metadata
}
MsgBlogIndex msg_ ->
let
( updatedPageModel, pageCmd ) =
case model.page of
ModelBlogIndex pageModel ->
Template.BlogIndex.template.update (Debug.todo \\"\\")
msg_
pageModel
|> Tuple.mapBoth ModelBlogIndex (Cmd.map MsgBlogIndex)
_ ->
-- not implemented yet
( model, Cmd.none )
_ ->
( model.page, Cmd.none )
in
( { model | page = updatedPageModel }, pageCmd )
mainTemplate { documents, manifest, canonicalSiteUrl } =