Fix Post rendering, thanks andy
This commit is contained in:
parent
99567b586b
commit
b663980b4b
|
@ -23,13 +23,14 @@ instance FromRow Post where
|
|||
fromRow = Post <$> field <*> field <*> field <*> field <*> field <*> field
|
||||
|
||||
render :: Post -> H.Html
|
||||
render post = do
|
||||
H.div ! A.class_ "card blue-grey darken-1" $ do
|
||||
H.div ! A.class_ "card-content white-text" $ do
|
||||
H.span ! A.class_ "card-title" $ H.toHtml $ unpack (author post)
|
||||
render post =
|
||||
let state = case readTextile def (unpack $ body post) of
|
||||
Right v -> v
|
||||
Left err -> error (show err)
|
||||
|
||||
state <- case readTextile def (unpack $ body post) of
|
||||
Right v -> return v
|
||||
Left err -> error (show err)
|
||||
in do
|
||||
H.div ! A.class_ "card blue-grey darken-1" $ do
|
||||
H.div ! A.class_ "card-content white-text" $ do
|
||||
H.span ! A.class_ "card-title" $ H.toHtml $ unpack (author post)
|
||||
|
||||
H.p $ writeHtml def state
|
||||
H.p $ writeHtml def state
|
||||
|
|
Loading…
Reference in New Issue