Render than do init logic

This commit is contained in:
Jeremy Dormitzer 2018-02-01 16:57:28 -07:00
parent 7972264b5b
commit 09a982ba05
No known key found for this signature in database
GPG Key ID: 04F17C0F5A32C320

View File

@ -264,10 +264,10 @@
(defn init
"Initializes the sidebar"
[]
(analytics/init-amplitude)
(analytics/log-event "OPENED_SIDEBAR")
(let [initial-state (update-state {:type :loading :loading true} (model))]
(run-render-loop initial-state)
(analytics/init-amplitude)
(analytics/log-event "OPENED_SIDEBAR")
(go (-> (fetch-hits)
(<!)
(#(update-state {:type :got-hits