fix: remove unused code

experiment/tanstack-table
Tienson Qin 2024-06-17 21:45:56 +08:00
parent 4e376cd67d
commit 516c47c853
1 changed files with 3 additions and 11 deletions

View File

@ -63,17 +63,9 @@
(when redirect?
(route-handler/redirect-to-page! page-uuid))
(let [page (db/get-page (or page-uuid title))]
(if-let [first-block (ldb/get-first-child @conn (:db/id page))]
(do
(block-handler/edit-block! first-block :max {:container-id :unknown-container})
page)
;; create first block and then focus it
(p/let [blocks-tx (db-worker-page/build-first-block-tx (:block/uuid page)
(or (:format options) (common-config/get-preferred-format config)))
_ (ldb/transact! conn blocks-tx {:outliner-op :insert-blocks})
first-block (ldb/get-first-child @conn (:db/id page))]
(block-handler/edit-block! first-block :max {:container-id :unknown-container})
page))))))
(when-let [first-block (ldb/get-first-child @conn (:db/id page))]
(block-handler/edit-block! first-block :max {:container-id :unknown-container}))
page))))
;; favorite fns
;; ============