From fe6514a5f5e2afba03628d5f006f8b64adecaf33 Mon Sep 17 00:00:00 2001 From: Nicholas Kariniemi Date: Sun, 29 Jun 2014 23:26:31 +0300 Subject: [PATCH] Add grubs on enter or click --- src/cljs/grub/state.cljs | 28 +++++++--------- src/cljs/grub/view.cljs | 69 ++++++++++++++++++++++++++++++---------- 2 files changed, 63 insertions(+), 34 deletions(-) diff --git a/src/cljs/grub/state.cljs b/src/cljs/grub/state.cljs index b64c29f..5dff427 100644 --- a/src/cljs/grub/state.cljs +++ b/src/cljs/grub/state.cljs @@ -11,7 +11,6 @@ :default :unknown-event) (defmethod handle-grub-event :unknown-event [event grubs] - (logs "Cannot handle unknown event:" event) grubs) (defn new-grub [id grub completed] @@ -49,7 +48,6 @@ :default :unknown-event) (defmethod handle-recipe-event :unknown-event [event recipes] - (logs "Cannot handle unknown event:" event) recipes) (defn new-recipe [id name grubs] @@ -69,18 +67,14 @@ (assoc-in [(:id event) :name] (:name event)) (assoc-in [(:id event) :grubs] (:grubs event)))) -(defn update-state-and-render [remote-chan] - (let [out (chan)] - (go-loop [state default-app-state] - (let [event (