fix build error

This commit is contained in:
hamid zarghami
2026-01-01 09:51:45 +03:30
parent 7a8df49b82
commit 97f70eefae
@@ -1,9 +1,15 @@
import { useEffect } from "react"; import { useEffect } from "react";
import Konva from "konva";
import { useEditorStore } from "../../store/editorStore"; import { useEditorStore } from "../../store/editorStore";
export const useKeyboardMovement = () => { export const useKeyboardMovement = () => {
const { selectedObjectId, objects, updateObject, deleteObject, tool, layerRef } = useEditorStore(); const {
selectedObjectId,
objects,
updateObject,
deleteObject,
tool,
layerRef,
} = useEditorStore();
useEffect(() => { useEffect(() => {
if (tool !== "select") { if (tool !== "select") {
@@ -12,7 +18,11 @@ export const useKeyboardMovement = () => {
const handleKeyDown = (e: KeyboardEvent) => { const handleKeyDown = (e: KeyboardEvent) => {
const target = e.target as HTMLElement; const target = e.target as HTMLElement;
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) { if (
target.tagName === "INPUT" ||
target.tagName === "TEXTAREA" ||
target.isContentEditable
) {
return; return;
} }
@@ -79,4 +89,3 @@ export const useKeyboardMovement = () => {
}; };
}, [selectedObjectId, objects, updateObject, deleteObject, tool, layerRef]); }, [selectedObjectId, objects, updateObject, deleteObject, tool, layerRef]);
}; };