Browse Source

fix: frontend lints

Gabriel Horner 1 year ago
parent
commit
266b626850

+ 3 - 1
.carve/ignore

@@ -85,4 +85,6 @@ frontend.db-worker/init
 ;; WIP fn, remove when it's ready
 frontend.worker.rtc.asset-sync/<loop-for-assets-sync
 ;; Future use?
-frontend.worker.rtc.hash/hash-blocks
+frontend.worker.rtc.hash/hash-blocks
+;; Repl fn
+frontend.rum/use-atom-in

+ 0 - 6
src/main/frontend/components/property/value.cljs

@@ -17,7 +17,6 @@
             [frontend.util :as util]
             [lambdaisland.glogi :as log]
             [rum.core :as rum]
-            [frontend.handler.route :as route-handler]
             [promesa.core :as p]
             [frontend.db.async :as db-async]
             [logseq.common.util.macro :as macro-util]
@@ -119,11 +118,6 @@
          (shui/popup-hide!)
          (exit-edit-property))))))
 
-(defn- navigate-to-date-page
-  [value]
-  (when value
-    (route-handler/redirect-to-page! (date/js-date->journal-title value))))
-
 (rum/defc date-picker
   [value {:keys [on-change editing? multiple-values?]}]
   (let [*trigger-ref (rum/use-ref nil)

+ 0 - 2
src/main/frontend/components/whiteboard.cljs

@@ -1,14 +1,12 @@
 (ns frontend.components.whiteboard
   "Whiteboard related components"
   (:require [cljs.math :as math]
-            [frontend.components.content :as content]
             [frontend.components.onboarding.quick-tour :as quick-tour]
             [frontend.components.page :as page]
             [frontend.components.reference :as reference]
             [frontend.context.i18n :refer [t]]
             [frontend.db-mixins :as db-mixins]
             [frontend.db.model :as model]
-            [frontend.handler.common :as common-handler]
             [frontend.handler.route :as route-handler]
             [frontend.handler.whiteboard :as whiteboard-handler]
             [frontend.modules.shortcut.core :as shortcut]

+ 1 - 2
src/main/frontend/routes.cljs

@@ -16,8 +16,7 @@
             [frontend.components.imports :as imports]
             [frontend.config :as config]
             [logseq.db :as ldb]
-            [frontend.db :as db]
-            [rum.core :as rum]))
+            [frontend.db :as db]))
 
 ;; http://localhost:3000/#?anchor=fn.1
 (def routes

+ 0 - 21
src/main/frontend/state.cljs

@@ -778,20 +778,6 @@ Similar to re-frame subscriptions"
                 (uuid id)))
        (distinct)))
 
-(defn sub-block-selected?
-  [block-uuid]
-  (let [*cache (:ui/select-query-cache @state)
-        keys [::select-block block-uuid]
-        atom (or (get @*cache keys)
-                 (let [result (r/cached-derived-atom
-                               (:selection/blocks @state)
-                               keys
-                               (fn [s]
-                                 (contains? (set (get-selected-block-ids s)) block-uuid)))]
-                   (swap! *cache assoc keys result)
-                   result))]
-    (rum/react atom)))
-
 (defn block-content-max-length
   [repo]
   (or (:block/content-max-length (sub-config repo)) 10000))
@@ -1265,13 +1251,6 @@ Similar to re-frame subscriptions"
   []
   @(:selection/direction @state))
 
-(defn show-custom-context-menu!
-  [links position]
-  (swap! state assoc
-         :custom-context-menu/show? true
-         :custom-context-menu/links links
-         :custom-context-menu/position position))
-
 (defn hide-custom-context-menu!
   []
   (swap! state assoc