 (ns cglossa.core
-  (:require [reagent.core :as r]
+  (:require [reagent.core :as reagent]
             [ajax.core :as ajax]
             [cglossa.start :as start]
             [cglossa.results :as results]))

      [:img.textlab-logo {:src "img/tekstlab.gif"}]]]))

(defn ^:export main []
  (r/render-component
    (fn []
      [app app-state app-data])
    (. js/document (getElementById "app"))))

(def data {:corpus nil
           :metadata-categories nil})

(defonce app-state (into {} (map (fn [[k v]] [k (reagent/atom v)]) state)))
(defonce app-data (into {} (map (fn [[k v]] [k (reagent/atom v)]) data)))

(defn response-handler [models response]
  (doseq [model (flatten [models])]
