diff --git a/src/cljs/grub/core.cljs b/src/cljs/grub/core.cljs index 1bd1e76..7850910 100644 --- a/src/cljs/grub/core.cljs +++ b/src/cljs/grub/core.cljs @@ -12,8 +12,7 @@ (state/sync-state! from-remote to-remote reset? state-changes))) (defn init-app [] - (let [state-changes (chan)]d - (view/render-app state/state state-changes) + (let [state-changes (view/render-app state/state state-changes)] (connect-to-server true state-changes))) (init-app) diff --git a/src/cljs/grub/view/app.cljs b/src/cljs/grub/view/app.cljs index 3b49fc5..0fe469b 100644 --- a/src/cljs/grub/view/app.cljs +++ b/src/cljs/grub/view/app.cljs @@ -25,10 +25,11 @@ (dom/on-document-mousedown #(put! >events {:type :body-mousedown :event %})) (dom/on-window-scroll #(put! >events {:type :body-scroll :event %})))))) -(defn render-app [state state-changes] +(defn render-app [state] (let [>events (chan) events :type) - add-grubs-ch (chan)] + add-grubs-ch (chan) + state-changes (chan)] (om/root app-view state {:target (.getElementById js/document "container") @@ -36,4 +37,5 @@ :