fix: stop shadowing vars for components

Turn on kondo :shadowed-var lint and fix failures.  If this lint had
been turned on, it would have caught logseq/db-test#38 and saved us time
from debugging which random component was accidentally shadowed by a var
and failing with 'Objects are not valid as a React child'. Also fixed a
few outside components but stopped b/c there are too many to do right
now
This commit is contained in:
Gabriel Horner
2024-08-23 15:19:20 -04:00
parent 187fa1d29e
commit 5ff364ba1e
32 changed files with 163 additions and 156 deletions

View File

@@ -802,8 +802,7 @@
(rum/local 1 ::current-page)
[state]
(let [*list-node-ref (rum/create-ref)
installed-plugins (state/sub [:plugin/installed-plugins])
installed-plugins (vals installed-plugins)
installed-plugins' (vals (state/sub [:plugin/installed-plugins]))
updating (state/sub :plugin/installing)
develop-mode? (state/sub :ui/developer-mode?)
selected-unpacked-pkg (state/sub :plugin/selected-unpacked-pkg)
@@ -816,9 +815,9 @@
*cached-query-flag (::cached-query-flag state)
*current-page (::current-page state)
default-filter-by? (= :default @*filter-by)
theme-plugins (filter #(:theme %) installed-plugins)
normal-plugins (filter #(not (:theme %)) installed-plugins)
filtered-plugins (when (seq installed-plugins)
theme-plugins (filter #(:theme %) installed-plugins')
normal-plugins (filter #(not (:theme %)) installed-plugins')
filtered-plugins (when (seq installed-plugins')
(if (= @*category :themes) theme-plugins normal-plugins))
total-nums [(count normal-plugins) (count theme-plugins)]
filtered-plugins (if-not default-filter-by?