    [:div {:class "row"}
     [:div {:class "col-md-12"}
      [:input {:type "button" :value "moar!"
-              :on-click (fn [] (println "get more posts"))}]]]
+              :id "btn-get-posts" :name "btn-get-posts"
+              :on-click (fn [] (println "get more posts") (get-saved-posts (:after @app-state)) )}]]]
    [:p "Reddit API Token: "
     [:input {:type "text" :id "token" :name "token"
              :value (:token @app-state) :readOnly "true"}]]])
-
-(defn handle-error [error]
-  (swap! error-msg #(str error))
-  (r/render-component [error-html] (dommy/sel1 :#error)))
 
 (defn process-json-post [post]
   (let [p (:data post)

            :on-click (fn [] (alandipert.storage-atom/remove-local-storage! :saved-for-reddit-app-state)
                        (set! (.-location js/window) "/"))}]])

(defn post-html [p]
  (let [link? (nil? (:title p))
        title (unescapeEntities (if link? (:link_title p) (:title p)))
        url (if link? (str (:link_url p) (:key p)) (:url p))
        body (if (not (nil? (:body_html p))) (unescapeEntities (:body_html p)))
        subreddit (:subreddit p)
        author (:author p)

      [:small "submitted by " [:a {:href (str "https://www.reddit.com/user/" author)} [:small author]]
       " on " created-on-str]]
     [:div {:class "panel-body"}
      [:div {:dangerouslySetInnerHTML {:__html body}}]
      [:div {:class "btn-group btn-group-xs" :role= "group" :aria-label key}
       [:button {:type "button" :class "btn btn-default"} "Unsave"]]]]))

(defn main-html [posts]
  [:div {:class "col-md-12"}
