fix issue with settings page @churik discovered

This commit is contained in:
Martin Klepsch 2018-03-15 14:43:08 +01:00 committed by Tetiana Churikova
parent ad581fd576
commit d98b26a16c
3 changed files with 4 additions and 10 deletions

View File

@ -53,7 +53,7 @@
[:a [:a
(merge props (merge props
(if (keyword? target) (if (keyword? target)
{:on-click #(rf/dispatch [target])} {:on-click #(commiteth.routes/nav! target)}
{:href target})) {:href target}))
caption]]))]])) caption]]))]]))
@ -66,7 +66,7 @@
[:div.ui.container.user-component [:div.ui.container.user-component
[user-dropdown [user-dropdown
@user @user
[[:update-address "My Payment Details" {}] [[:settings "My Payment Details" {}]
["/logout" "Sign Out" {:class "logout-link"}]] ["/logout" "Sign Out" {:class "logout-link"}]]
mobile?]] mobile?]]
[:a.ui.button.small.login-button {:href js/authorizeUrl} (str "LOG IN" [:a.ui.button.small.login-button {:href js/authorizeUrl} (str "LOG IN"
@ -207,7 +207,7 @@
:bounties [bounties-page] :bounties [bounties-page]
:repos [repos-page] :repos [repos-page]
:manage-payouts [manage-payouts-page] :manage-payouts [manage-payouts-page]
:update-address [update-address-page] :settings [update-address-page]
:usage-metrics [usage-metrics-page])]] :usage-metrics [usage-metrics-page])]]
(when (show-top-hunters?) (when (show-top-hunters?)
[:div.five.wide.column.computer.only [:div.five.wide.column.computer.only

View File

@ -312,12 +312,6 @@
(:status-text response)))]})) (:status-text response)))]}))
(reg-event-fx
:update-address
(fn [{:keys [db]} [_]]
{:db db
:dispatch [:set-active-page :update-address]}))
(reg-event-db (reg-event-db
:update-user :update-user
(fn [db [_ fields]] (fn [db [_ fields]]

View File

@ -7,7 +7,7 @@
["/activity" :activity] ["/activity" :activity]
["/repos" :repos] ["/repos" :repos]
["/manage-payouts" :manage-payouts] ["/manage-payouts" :manage-payouts]
["/update-address" :update-address] ["/settings" :settings]
["/usage-metrics" :usage-metrics]])) ["/usage-metrics" :usage-metrics]]))
(defn on-navigate (defn on-navigate