perf: load latest 1 journal instead of 3 journals

experiment/tanstack-table
Tienson Qin 2024-06-12 06:34:51 +08:00
parent 18907dca30
commit d4f21e4c22
3 changed files with 5 additions and 4 deletions

View File

@ -9,12 +9,14 @@
(rum/defc journal-cp < rum/reactive
[page]
(let [;; Don't edit the journal title
repo (state/sub :git/current-repo)]
(let [repo (state/sub :git/current-repo)]
(page/page {:repo repo
:page-name (str (:block/uuid page))})))
(rum/defc journals < rum/reactive
{:will-unmount (fn [state]
(state/set-journals-length! 1)
state)}
[latest-journals]
[:div#journals
(ui/infinite-list

View File

@ -210,7 +210,6 @@
(defn go-to-journals!
[]
(state/set-journals-length! 3)
(let [route (if (state/custom-home-page?)
:all-journals
:home)]

View File

@ -55,7 +55,7 @@
:draw? false
:db/restoring? nil
:journals-length 3
:journals-length 1
:search/q ""
:search/mode nil ; nil -> global mode, :graph -> add graph filter, etc.