diff options
Diffstat (limited to 'app/Main.hs')
-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 |