From 87b77f4d5befc92f91693f8e4ff33c7ee400f665 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Sat, 2 Mar 2024 12:03:51 +0200 Subject: [PATCH] refactor --- src/renderer/handlers.cljs | 4 ++-- src/renderer/toolbar/status.cljs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/handlers.cljs b/src/renderer/handlers.cljs index faef7f7b..79a32a79 100644 --- a/src/renderer/handlers.cljs +++ b/src/renderer/handlers.cljs @@ -1,7 +1,7 @@ (ns renderer.handlers (:require [re-frame.core :as rf] - [renderer.element.handlers :as element-h])) + [renderer.element.handlers :as element.h])) (defn set-state [db state] @@ -22,7 +22,7 @@ (fn [db file] (case (.-type file) "image/png" - (element-h/add db {:type :element + (element.h/add db {:type :element :tag :image :attrs {:x (first adjusted-pointer-pos) :y (second adjusted-pointer-pos) diff --git a/src/renderer/toolbar/status.cljs b/src/renderer/toolbar/status.cljs index 6669302f..98688391 100644 --- a/src/renderer/toolbar/status.cljs +++ b/src/renderer/toolbar/status.cljs @@ -97,7 +97,7 @@ (defn a11y-select [] - (let [filter @(rf/subscribe [:document/filter])] + (when-let [filter @(rf/subscribe [:document/filter])] [:> Select/Root {:value (name filter) :onValueChange #(rf/dispatch [:document/set-filter %])} [:> Select/Trigger