From 57f0cb00a13cc9b8687c2693b7812be0c88bf03a Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 3 Mar 2025 16:35:46 +0100 Subject: drop layouts Layouts seem to be an abstraction of haskell-halogen, that is not in purescript-halogen. --- app/Main.hs | 42 ++++++++++++++++++++---------------------- 1 file 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 -- cgit v1.2.3