#37: add forgotten file

This commit is contained in:
Teemu Patja 2017-03-17 23:23:01 +02:00
parent 100fd462c0
commit 1f6ef6e161
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
1 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,42 @@
(ns commiteth.bounties
(:require [re-frame.core :as rf]
[commiteth.common :refer [moment-timestamp
issue-url]]))
(defn bounty-item [bounty]
(println bounty)
(let [{avatar-url :repo_owner_avatar_url
owner :repo_owner
repo-name :repo_name
issue-title :issue_title
issue-number :issue_number
updated :updated
balance :balance} bounty
full-repo (str owner "/" repo-name)
issue-link [:a
{:href (issue-url owner repo-name issue-number)}
issue-title]]
[:div.item.activity-item
"test"
[:div.ui.mini.circular.image
[:img {:src avatar-url}]]]
[:div.item.activity-item
[:div.content
[:div.header.display-name full-repo]
[:div.description
issue-link]
[:div.footer-row
[:div.balance-badge (str "ETH " balance )]
[:div.time (moment-timestamp updated)]]]]))
(defn bounties-page []
(let [open-bounties (rf/subscribe [:open-bounties])]
(fn []
[:div.ui.container
(if (empty? @open-bounties)
[:div.ui.text "No data"]
(into [:div.ui.items]
(for [bounty @open-bounties]
[bounty-item bounty])))])))