From 7fe196d2e901664a5a43a324a913e083a48eae63 Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Thu, 30 Jun 2022 13:18:56 -0700 Subject: [PATCH] Fix lamdera error with unserializable Data in example. --- examples/routing/app/Route/Slide/Number_.elm | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/examples/routing/app/Route/Slide/Number_.elm b/examples/routing/app/Route/Slide/Number_.elm index 83d221e5..d85fe73f 100644 --- a/examples/routing/app/Route/Slide/Number_.elm +++ b/examples/routing/app/Route/Slide/Number_.elm @@ -94,16 +94,9 @@ data routeParams = (slideBody routeParams) -slideBody : RouteParams -> DataSource.DataSource (List (Html.Html Msg)) +slideBody : RouteParams -> DataSource.DataSource String slideBody route_ = - DataSource.File.bodyWithoutFrontmatter - "slides.md" - |> DataSource.map - (\rawBody -> - [ rawBody - |> Html.text - ] - ) + DataSource.File.bodyWithoutFrontmatter "slides.md" head : @@ -127,7 +120,7 @@ head static = type alias Data = - { body : List (Html.Html Msg) + { body : String } @@ -148,8 +141,8 @@ view maybeUrl sharedModel model static = , Tw.py_6 ] ] - ((static.data.body |> List.map (Html.map Pages.Msg.UserMsg)) - ++ [ Html.text static.routeParams.number ] + ((static.data.body |> Html.text) + :: [ Html.text static.routeParams.number ] ) ] }