       ^{:key competition} [competition-item competition])]
    [:h2 "Importera en ny tävling : "]
    [:input.btn.btn-default {:type "file" :value "Import file"
-                            :onChange #(on-click-import-file %)}]
-   ])
+                            :onChange #(on-click-import-file %)}]])
 
 (defn menu-component []
-  (let [visible-component (atom :competitions;:none
-                   )]
+  (let [visible-component (atom :none)]
     (fn []
       [:div.container
        [:div.header

;;              [{:competitor/name "Ringo Stingo" :competitor/number 20, :competitor/club "Kapangg"}
;;               {:competitor/name "Greve Turbo", :competitor/number 21, :competitor/club "OOoost"}]}]}]}))

(defonce app-state
  (atom {:competitions []}))

(defonce component-state
  (atom {:competitions-visible false}))

;(def app-state (atom []))

(defn competitor-component [competitors]
  [:div ""
   [:ul
    (for [competitor competitors]
      ^{:key competitor}
      [:li
       (str "Competitor number: "
            (:competitor/number competitor)
            " - "
            (:competitor/name competitor)
            " / "
            (:competitor/club competitor))])]])

(defn class-component [classes]
  [:h3 "Classes"]
  [:div
   (for [cls classes]
     ^{:key cls} [:div
                  (:class/name cls)
                  [competitor-component (:class/competitors cls)]
                  ])])

;; (defn competition-component []
;;   [:div
;;    [:h2 "Competition"]
;;    [:h3 (str "Name :" (:competition/name @app-state)) ]
;;    [:h3 (str "Date :" (:competition/date @app-state)) ]
;;    [:h3 (str "Location :" (:competition/location @app-state))]
;;    [:h3 (str "Classes :")] 
;;    [class-component (:competition/classes @app-state)]])

;(defn competition-component [])

(defn competition-item []
  (let [open (atom false)]

        [:label  (str (:competition/name competition) " i "
                      (:competition/location competition) " den "
                      (:competition/date competition))]
        [:input.btn.btn-default
         {:type "button"
          :value (if @open "Stäng" "Öppna")
          :on-click #(swap! open not)}]]
       (if @open
         [:div
          [:h4 "Klasser :"]
          [class-component (:competition/classes competition)]])])))

(defn competitors-component []
  [:div
   [:h2 "Tillgängliga dansare"]
   [competitor-component (get-dancers (:competitions @app-state))]])

(defn import-component []
  [:div
