1
0
Tienson Qin 3 жил өмнө
parent
commit
08ba4348b9

+ 3 - 3
src/main/frontend/components/journal.cljs

@@ -24,7 +24,7 @@
     (page/page-blocks-cp repo page-e {})))
     (page/page-blocks-cp repo page-e {})))
 
 
 (rum/defc journal-cp < rum/reactive
 (rum/defc journal-cp < rum/reactive
-  [[title format]]
+  [title]
   (let [;; Don't edit the journal title
   (let [;; Don't edit the journal title
         page (string/lower-case title)
         page (string/lower-case title)
         repo (state/sub :git/current-repo)
         repo (state/sub :git/current-repo)
@@ -77,9 +77,9 @@
   [:div#journals
   [:div#journals
    (ui/infinite-list
    (ui/infinite-list
     "main-content-container"
     "main-content-container"
-    (for [{:block/keys [name format]} latest-journals]
+    (for [{:block/keys [name]} latest-journals]
       [:div.journal-item.content {:key name}
       [:div.journal-item.content {:key name}
-       (journal-cp [name format])])
+       (journal-cp name)])
     {:has-more (page-handler/has-more-journals?)
     {:has-more (page-handler/has-more-journals?)
      :more-class "text-4xl"
      :more-class "text-4xl"
      :on-top-reached page-handler/create-today-journal!
      :on-top-reached page-handler/create-today-journal!

+ 1 - 2
src/main/frontend/db/react.cljs

@@ -236,8 +236,7 @@
   "Get affected queries through transaction datoms."
   "Get affected queries through transaction datoms."
   [{:keys [tx-data db-before db-after]}]
   [{:keys [tx-data db-before db-after]}]
   {:post [(s/valid? ::affected-keys %)]}
   {:post [(s/valid? ::affected-keys %)]}
-  (let [repo (state/get-current-repo)
-        blocks (->> (filter (fn [datom] (contains? #{:block/left :block/parent :block/page} (:a datom))) tx-data)
+  (let [blocks (->> (filter (fn [datom] (contains? #{:block/left :block/parent :block/page} (:a datom))) tx-data)
                     (map :v)
                     (map :v)
                     (distinct))
                     (distinct))
         refs (->> (filter (fn [datom] (contains? #{:block/refs :block/path-refs} (:a datom))) tx-data)
         refs (->> (filter (fn [datom] (contains? #{:block/refs :block/path-refs} (:a datom))) tx-data)