             title]
           [:button.destroy
             {:on-click #(dispatch [:delete-todo id])}]]
-       (when @editing
-         [todo-input
-           {:class "edit"
-            :title title
-            :on-save #(dispatch [:save id %])
-            :on-stop #(reset! editing false)}])])))
-
-
-(defn footer
-  []
-  [:footer#info
-   [:p "Double-click to edit a todo"]])
+        (when @editing
+          [todo-input
+            {:class "edit"
+             :title title
+             :on-save #(dispatch [:save id %])
+             :on-stop #(reset! editing false)}])])))
 
 
 (defn task-list

        [:footer#footer

          [:span#todo-count
           [:strong active] " " (case active 1 "item" "items") " left"]
          [:ul#filters
           [:li (a-fn :all    "All")]
           [:li (a-fn :active "Active")]
           [:li (a-fn :done   "Completed")]]
          (when (pos? done)
            [:button#clear-completed {:on-click #(dispatch [:clear-completed])}
             "Clear completed"])]))))


(defn task-entry
  []
  [:header#header
   [:h1 "todos"]
   [todo-input
    {:id "new-todo"
     :placeholder "What needs to be done?"
     :on-save #(dispatch [:add-todo %])}]])


(defn todo-app

          (when (seq @todos)
            [task-list])
          [footer-controls]]
        [:footer#info
          [:p "Double-click to edit a todo"]]])))
