Inline let binding and rename param.

This commit is contained in:
Dillon Kearns 2021-04-03 06:18:57 -07:00
parent 39b83767b6
commit 09cc5f3247

View File

@ -862,21 +862,14 @@ staticResponseForPage :
}
)
)
staticResponseForPage siteMetadata viewFn =
-- TODO need all Routes here, and their page paths
-- need to start with hardcoding the static URLs
-- eventually, getStaticPaths equivalent
siteMetadata
staticResponseForPage staticRoutes viewFn =
staticRoutes
|> List.map
(\( pagePath, route ) ->
let
thing =
viewFn []
{ path = pagePath
, frontmatter = route
}
in
Ok ( pagePath, thing )
Ok
( pagePath
, viewFn [] { path = pagePath, frontmatter = route }
)
)
|> combine