Skip to content

Commit

Permalink
Make candidate,employer,arbiter search results links
Browse files Browse the repository at this point in the history
  • Loading branch information
madis committed Mar 12, 2024
1 parent 193c836 commit ebde07b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion ui/src/ethlance/ui/page/arbiters.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
[ethlance.ui.component.select-input :refer [c-select-input]]
[ethlance.ui.component.tag :refer [c-tag c-tag-label]]
[ethlance.ui.component.text-input :refer [c-text-input]]
[ethlance.ui.util.navigation :as navigation]
[ethlance.ui.util.tokens :as tokens]
[re-frame.core :as re]))

Expand Down Expand Up @@ -99,7 +100,9 @@

(defn c-arbiter-element
[{:keys [:user/id] :as arbiter}]
[:div.arbiter-element {:on-click #(re/dispatch [::router-events/navigate :route.user/profile {:address id} {:tab "arbiter"}])}
[:a.arbiter-element (navigation/link-params {:route :route.user/profile
:params {:address id}
:query {:tab "arbiter"}})
[:div.profile
[:div.profile-image [c-profile-image {:src (-> arbiter :user :user/profile-image)}]]
[:div.name (get-in arbiter [:user :user/name])]]
Expand Down
6 changes: 4 additions & 2 deletions ui/src/ethlance/ui/page/candidates.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[cuerdas.core :as str]
[district.ui.component.page :refer [page]]
[district.ui.graphql.subs :as gql]
[district.ui.router.events :as router-events]
[ethlance.shared.constants :as constants]
[ethlance.shared.enumeration.currency-type :as enum.currency]
[ethlance.ui.component.currency-input :refer [c-currency-input]]
Expand All @@ -22,6 +21,7 @@
[ethlance.ui.component.select-input :refer [c-select-input]]
[ethlance.ui.component.tag :refer [c-tag c-tag-label]]
[ethlance.ui.component.text-input :refer [c-text-input]]
[ethlance.ui.util.navigation :as navigation]
[ethlance.ui.util.tokens :as tokens]
[re-frame.core :as re]))

Expand Down Expand Up @@ -104,7 +104,9 @@

(defn c-candidate-element
[candidate]
[:div.candidate-element {:on-click #(re/dispatch [::router-events/navigate :route.user/profile {:address (-> candidate :user/id)} {:tab "candidate"}])}
[:a.candidate-element (navigation/link-params {:route :route.user/profile
:params {:address (-> candidate :user/id)}
:query {:tab "candidate"}})
[:div.profile
[:div.profile-image [c-profile-image {:src (-> candidate :user :user/profile-image)}]]
[:div.name (-> candidate :user :user/name)]
Expand Down
6 changes: 4 additions & 2 deletions ui/src/ethlance/ui/page/employers.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
[ethlance.ui.component.rating :refer [c-rating]]
[ethlance.ui.component.search-input :refer [c-chip-search-input]]
[ethlance.ui.component.select-input :refer [c-select-input]]
[ethlance.ui.component.tag :refer [c-tag c-tag-label]]
[ethlance.ui.component.text-input :refer [c-text-input]]
[ethlance.ui.util.navigation :as navigation]
[re-frame.core :as re]))


Expand Down Expand Up @@ -78,7 +78,9 @@

(defn c-employer-element
[{:employer/keys [professional-title] :as employer}]
[:div.employer-element
[:a.employer-element (navigation/link-params {:route :route.user/profile
:params {:address (:user/id employer)}
:query {:tab "employer"}})
[:div.profile
[:div.profile-image [c-profile-image {:src (get-in employer [:user :user/profile-image])}]]
[:div.name (get-in employer [:user :user/name])]
Expand Down

0 comments on commit ebde07b

Please sign in to comment.