Fix lamdera error with unserializable Data in example.

This commit is contained in:
Dillon Kearns 2022-06-30 13:18:56 -07:00
parent 5f148bf277
commit 7fe196d2e9

View File

@ -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 ]
)
]
}