mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 12:52:27 +03:00
Fix lamdera error with unserializable Data in example.
This commit is contained in:
parent
5f148bf277
commit
7fe196d2e9
@ -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 ]
|
||||
)
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user