소스 검색

chore: remove unused fn

Tienson Qin 2 년 전
부모
커밋
563409bd93
2개의 변경된 파일1개의 추가작업 그리고 16개의 파일을 삭제
  1. 1 11
      src/main/frontend/components/repo.cljs
  2. 0 5
      src/main/frontend/ui.cljs

+ 1 - 11
src/main/frontend/components/repo.cljs

@@ -1,6 +1,5 @@
 (ns frontend.components.repo
-  (:require [clojure.string :as string]
-            [frontend.components.widgets :as widgets]
+  (:require [frontend.components.widgets :as widgets]
             [frontend.config :as config]
             [frontend.context.i18n :refer [t]]
             [frontend.db :as db]
@@ -19,15 +18,6 @@
             [frontend.handler.file-sync :as file-sync]
             [reitit.frontend.easy :as rfe]))
 
-(rum/defc add-repo
-  [args]
-  (if-let [graph-types (get-in args [:query-params :graph-types])]
-    (let [graph-types-s (->> (string/split graph-types #",")
-                             (mapv keyword))]
-      (when (seq graph-types-s)
-        (widgets/add-graph :graph-types graph-types-s)))
-    (widgets/add-graph)))
-
 (rum/defc normalized-graph-label
   [{:keys [url remote? GraphName GraphUUID] :as graph} on-click]
   (when graph

+ 0 - 5
src/main/frontend/ui.cljs

@@ -6,7 +6,6 @@
             ["react-textarea-autosize" :as TextareaAutosize]
             ["react-tippy" :as react-tippy]
             ["react-transition-group" :refer [CSSTransition TransitionGroup]]
-            [camel-snake-kebab.core :as csk]
             [cljs-bean.core :as bean]
             [clojure.string :as string]
             [datascript.core :as d]
@@ -1006,10 +1005,6 @@
              :options               {:theme (when (= (state/sub :ui/theme) "dark") "dark")}
              :on-tweet-load-success #(reset! *loading? false)})]]))
 
-(defn tabler-icon
-  [name]
-  (gobj/get js/tablerIcons (str "Icon" (csk/->PascalCase name))))
-
 (def icon shui/icon)
 
 (rum/defc button-inner