         :response-format :json
         :keywords? true}))
 
+(defn get-group-expenses []
+  (GET (str "/api/v1/groups/" group-id "/expenses")
+       {:handler #(dispatch [:group-expenses %])
+        :error #(.log js/console %)
+        :response-format :json
+        :keywords? true}))
+
 (defn ^:export init []
   (get-group-info)
+  (get-group-expenses)
   (r/render [app] (get-element "app")))

                                :on-click submit-expense-form}
        "Add expense"]])))

(defn app []
  [:div
   [show-group]
   [expense-form]])

(defn get-group-info []
  (GET (str "/api/v1/groups/" group-id)

                    (assoc-in [:expense-form :shared-with]
                              (into {} (map #(vec [% true]) (:members value))))
                    (assoc-in [:expense-form :payed-by] (first (:members value))))
    :group-expenses (assoc state :group-expenses value)
    :shared-with (update-in state [:expense-form :shared-with value] not)
    :change-amount (assoc-in state [:expense-form :amount] value)
    :change-payed-by (assoc-in state [:expense-form :payed-by] value)
