add table to list view

This commit is contained in:
Alexander Foremny
2024-06-04 15:42:33 +02:00
parent ed753b0410
commit d5f3f2333a
3 changed files with 49 additions and 7 deletions

View File

@@ -48,8 +48,8 @@ updateModel (FormSubmitted output) m =
viewModel :: Model -> View Action
viewModel m =
div_ [] $
[ viewSchema m.schema,
viewPosts m.posts,
[ schemaTable m.schema m.posts,
viewSchema m.schema,
viewForm m.input m.schema,
viewInput m.input
]
@@ -63,8 +63,3 @@ viewForm input =
viewInput :: A.Value -> View Action
viewInput input =
pre_ [] [text (toMisoString (A.encode input))]
viewPosts :: [A.Value] -> View Action
viewPosts posts = ol_ [] (viewPost <$> posts)
where
viewPost post = pre_ [] [text (toMisoString (A.encode post))]