From 78597374ab0527a2ef1cff6160f768db0696563b Mon Sep 17 00:00:00 2001 From: Dexterity <173429049+Dexterity104@users.noreply.github.com> Date: Thu, 28 May 2026 09:37:20 -0400 Subject: [PATCH] :recycle: Migrate history-entry to modern component syntax (#9461) Co-authored-by: Andrey Antukh --- .../app/main/ui/workspace/sidebar/history.cljs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/history.cljs b/frontend/src/app/main/ui/workspace/sidebar/history.cljs index eae0f0dcea..31972b2868 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/history.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/history.cljs @@ -303,9 +303,9 @@ nil)])) -(mf/defc history-entry +(mf/defc history-entry* {::mf/props :obj} - [{:keys [entry idx-entry disabled? current?]}] + [{:keys [entry idx-entry is-disabled is-current]}] (let [hover? (mf/use-state false) show-detail? (mf/use-state false) @@ -323,8 +323,8 @@ (when has-entry? (swap! show-detail? not)))))] [:div {:class (stl/css-case :history-entry true - :disabled disabled? - :current current? + :disabled is-disabled + :current is-current :hover @hover? :show-detail @show-detail?) :on-pointer-enter #(reset! hover? true) @@ -378,11 +378,11 @@ :text (tr "workspace.undo.empty")}]] [:ul {:class (stl/css :history-entries)} (for [[idx-entry entry] (->> entries (map-indexed vector) reverse)] #_[i (range 0 10)] - [:& history-entry {:key (str "entry-" idx-entry) - :entry entry - :idx-entry idx-entry - :current? (= idx-entry index) - :disabled? (> idx-entry index)}])])])) + [:> history-entry* {:key (str "entry-" idx-entry) + :entry entry + :idx-entry idx-entry + :is-current (= idx-entry index) + :is-disabled (> idx-entry index)}])])]))