chore: disable flashcards for db graphs for now

This commit is contained in:
Tienson Qin
2024-06-03 16:03:07 +08:00
parent e7de721dde
commit 662679fae7
3 changed files with 13 additions and 5 deletions

View File

@@ -285,6 +285,7 @@
[el-rect set-el-rect!] (rum/use-state nil)
ref-el (rum/use-ref nil)
ref-open? (rum/use-ref left-sidebar-open?)
db-based? (config/db-based-graph? (state/get-current-repo))
default-home (get-default-home-if-valid)
route-name (get-in route-match [:data :name])
on-contents-scroll #(when-let [^js el (.-target %)]
@@ -397,7 +398,7 @@
:icon-extension? true
:shortcut :go/whiteboards}))
(when (state/enable-flashcards? (state/get-current-repo))
(when (and (state/enable-flashcards? (state/get-current-repo)) (not db-based?))
[:div.flashcards-nav
(flashcards srs-open?)])