            [track-component track]])]])
 
 (defn page-component []
-  [:div.page
+  [:main
    [info-component]
    [upload-component]
    [playlist-component]

     "-")])

(defn now-playing-component []
  [:div.now-playing
   [:span "Now playing:"]
   [track-component (get-in @state [:playlist "current"])]])

(defn next-component []
  [:div.next
   [:span "Next:"]
   [:ul
    (for [track (get-in @state [:playlist "next"])]

    (let [title   (get-in @state [:info "name"])
          message (get-in @state [:info "greet_message"])
          url     (get-in @state [:info "stream_url"])]
      [:section#info
       [:h1 title]
       [:p message]
       [:audio {:src url
                :controls "controls"}]])))

(defn upload-component []
  [:section#upload
   [:h2 "Upload"]
   [:form {:id "upload"}
    [:input {:type "file" :name "track"}]
    [:input {:type "button" :value "Upload" :on-submit upload!}]]
   [:p (@state :upload-status)]])

(defn playlist-add-component [track]
  [:input.add
   {:type "button" :value "+"
    :on-click #(playlist-add (track "uuid"))}])

(defn playlist-remove-component [track]
  [:input.remove
   {:type "button" :value "-"
    :on-click #(playlist-remove (track "uuid"))}])

