From a6690859cc20e27d2aad9ce1278778be10b7cc5a Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Wed, 22 Mar 2017 13:19:36 +0200 Subject: [PATCH] Show open bounties tab regardless of sign in state --- src/cljs/commiteth/core.cljs | 13 ++++++++----- src/cljs/commiteth/handlers.cljs | 3 +-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cljs/commiteth/core.cljs b/src/cljs/commiteth/core.cljs index f9cdafa..3fda779 100644 --- a/src/cljs/commiteth/core.cljs +++ b/src/cljs/commiteth/core.cljs @@ -71,10 +71,10 @@ (let [user (rf/subscribe [:user]) current-page (rf/subscribe [:page])] (fn [] - (let [tabs (apply conj [[:activity "Activity"]] + (let [tabs (apply conj [[:activity "Activity"] + [:bounties "Open bounties"]] (when @user - [[:bounties "Open bounties"] - [:repos "Repositories"] + [[:repos "Repositories"] [:manage-payouts "Manage Payouts"]]))] (into [:div.ui.attached.tabular.menu.tiny.commiteth-tabs] (for [[page caption] tabs] @@ -183,8 +183,11 @@ (reset! active-user nil))) (defn load-data [] - (rf/dispatch [:load-activity-feed]) - (rf/dispatch [:load-top-hunters]) + (doall + (map rf/dispatch + [[:load-open-bounties] + [:load-activity-feed] + [:load-top-hunters]])) (load-user)) (defonce timer-id (r/atom nil)) diff --git a/src/cljs/commiteth/handlers.cljs b/src/cljs/commiteth/handlers.cljs index f599db8..dc083ac 100644 --- a/src/cljs/commiteth/handlers.cljs +++ b/src/cljs/commiteth/handlers.cljs @@ -138,8 +138,7 @@ {:db (assoc db :user (:user user-profile)) :dispatch-n [[:load-user-repos] - [:load-owner-bounties] - [:load-open-bounties]]})) + [:load-owner-bounties]]})) (reg-event-db :clear-repos-loading