diff options
author | 2025-03-03 16:35:46 +0100 | |
---|---|---|
committer | 2025-03-03 16:35:47 +0100 | |
commit | 57f0cb00a13cc9b8687c2693b7812be0c88bf03a (patch) | |
tree | 1a99bf31072a26dce2f12b70c52c9904e4bcfff2 | |
parent | 6aca27e17d2beb7325c8e8259de238a327451a59 (diff) |
drop layouts
Layouts seem to be an abstraction of haskell-halogen, that is not in
purescript-halogen.
-rw-r--r-- | app/Main.hs | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/app/Main.hs b/app/Main.hs index 892cbb2..aa9ca72 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -100,28 +100,26 @@ component = render :: (MonadDOM m, MonadUnliftIO m) => [Chat] -> H.ComponentHTML Action slots m render chats = - L.runLayoutM Horizontal $ L.do - HH.div_ - ( Protolude.map - ( \(index, (Chat chatMessages draft)) -> - HH.div_ - [ HH.div_ - ( Protolude.map - ( \(Message message) -> - HH.text message - ) - chatMessages - ), - HH.input - [ HP.value draft, - HE.onInputValueChange $ Just . (DraftChanged index), - HE.onClick (\_ -> DraftSubmitted index) - ] - ] - ) - (zip [1 ..] chats) - ) - L.end + HH.div_ + ( Protolude.map + ( \(index, (Chat chatMessages draft)) -> + HH.div_ + [ HH.div_ + ( Protolude.map + ( \(Message message) -> + HH.text message + ) + chatMessages + ), + HH.input + [ HP.value draft, + HE.onInputValueChange $ Just . (DraftChanged index), + HE.onClick (\_ -> DraftSubmitted index) + ] + ] + ) + (zip [1 ..] chats) + ) handleQuery = \case NoOpQ -> do |