adjust value-usd check

This commit is contained in:
Rob Culliton 2018-05-05 21:33:29 -04:00
parent 4db70dfc41
commit 356e344026
No known key found for this signature in database
GPG Key ID: 6FDEF60B3DC84D94

View File

@ -249,20 +249,18 @@
[:span.pt2
[:img.o-50.pl3.pt2 {:src image-src}]])
(defn three-dots [bounty]
(let [{:keys [issue-id value-usd]} bounty]
(when (pos? value-usd)
[:div.fl.w-20
[:div
{:on-click #(rf/dispatch [:three-dots-open])}
[three-dots-box "ic-more-vert-black-24dp-1x.png"]]])))
(defn three-dots []
[:div.fl.w-20
[:div
{:on-click #(rf/dispatch [:three-dots-open])}
[three-dots-box "ic-more-vert-black-24dp-1x.png"]]])
(defn revoke-dropdown [bounty]
(let [menu (if @(rf/subscribe [:three-dots-open?])
[:div.ui.menu.revoke-transition {:tab-index -1}]
[:div.ui.menu.transition.hidden])]
[:div
[three-dots bounty]
[three-dots]
(into menu [[:div.revoke-item
[:a
{:on-click #(rf/dispatch [:revoke-bounty {:issue-id (:issue-id bounty)}])}
@ -272,7 +270,9 @@
[:div.w-third-l.fl-l.pa2
[square-card
[bounty-title-link bounty {:show-date? true :max-length 60}]
[:div [small-card-balances bounty] [revoke-dropdown bounty]]]])
[:div [small-card-balances bounty]
(when (pos? (:value-usd bounty))
[revoke-dropdown bounty])]]])
(defn paid-bounty [bounty]
[:div.w-third-l.fl-l.pa2