feat: show item type for serach result

pull/2456/head
Junyu Zhan 2021-07-23 17:01:04 +08:00
parent 1250aa35aa
commit 3ab27c841b
1 changed files with 3 additions and 1 deletions

View File

@ -18,11 +18,13 @@
(rum/defc zotero-search-item [{:keys [data] :as item} id]
(let [title (:title data)
type (:item-type data)
abstract (str (subs (:abstract-note data) 0 200) "...")]
[:div.px-2.py-4.border-b.cursor-pointer.border-solid.hover:bg-gray-100.last:border-none
{:on-click (fn [] (go (<! (zotero-handler/create-zotero-page item {:block-dom-id id}))))}
[[:div.font-bold.mb-1 title]
[[:div [[:span.font-bold.mb-1.mr-1 title]
[:span.text-xs.p-1.bg-gray-100.rounded type]]]
[:div.text-sm abstract]]]))
(rum/defc zotero-search