   [view {}
    [text {:style {:text-align "center"}} "Before you start doing pushups, learn optimal pushup technique"]
    [touchable-highlight {:style {:background-color "#999" :padding 10 :border-radius 5}
-                        :on-press #(.openURL linking pushup-form-url)}
+                         :on-press #(.openURL linking pushup-form-url)}
     [text {:style {:color "white" :text-align "center" :font-weight "bold"}} "Read article about form"]
     ]
    [touchable-highlight {:style {:background-color "#999" :padding 10 :border-radius 5 :margin 10}

       [text {:style {:color "white" :text-align "center" :font-weight "bold"}} "Done!"]]]
     )])

(defn app-root []
  (let [stage (subscribe [:stage])]
    (fn []
      [view {:style {:flex-direction "column" :margin 40 :align-items "center"}}
       [text {:style {:font-size 40 :font-weight "100" :margin-bottom 10 :text-align "center"}} "100 Pushup Challenge"]
       [text {:style {:font-size 20 :font-weight "100" :margin-bottom 20 :text-align "center"}} "Become a pushup master"]
       (case @stage
         :get-started [get-started]
         :learn-pushup-form [learn-pushup-form]
         :do-pushup-test [do-pushup-test]
         :do-plank-test [do-plank-test]
         :show-day (let [day @(subscribe [:days-exercise])]
                     (if (= day :exr/do-test)
                       [do-pushup-test]
                       [show-day day]))
         [invalid-stage])
       [touchable-highlight {:style {:background-color "#999" :padding 10 :border-radius 5 :margin-top 20}
                             :on-press #(do
                                          (dispatch [:db/reset])
                                          (dispatch [:db/save]))}
        [text {:style {:color "white" :text-align "center" :font-weight "bold"}} "Reset"]]])))

(defn init []
  (dispatch-sync [:boot/init])

(def image (r/adapt-react-class (.-Image ReactNative)))
(def scroll-view (r/adapt-react-class ReactNative.ScrollView))
(def touchable-highlight (r/adapt-react-class (.-TouchableHighlight ReactNative)))
(def tab-bar (r/adapt-react-class ReactNative.TabBarIOS))
(def tab-bar-item (r/adapt-react-class ReactNative.TabBarIOS.Item))

(def pushup-form-url "http://www.100pushups.com/perfect-pushups-posture/")

