From 8864f54396f0268850ca05331e14befae8fe1285 Mon Sep 17 00:00:00 2001 From: Nate Ferrell Date: Mon, 30 Sep 2024 02:15:07 -0500 Subject: [PATCH] feat: #comment fixes --- src/components/DeviceNode.tsx | 2 ++ src/components/EditDeviceForm.tsx | 2 +- src/hooks/useAudioDeviceStore.ts | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/DeviceNode.tsx b/src/components/DeviceNode.tsx index d1ef684..0f9ba4c 100644 --- a/src/components/DeviceNode.tsx +++ b/src/components/DeviceNode.tsx @@ -28,6 +28,8 @@ const DeviceNode: React.FC = ({ const lastPositionRef = useRef({ x: 0, y: 0 }); const [nodeSize, setNodeSize] = useState({ width: 0, height: 0 }); + console.log(gridWidth, gridHeight, nodeSize); + useEffect(() => { setPosition(device.position); }, [device.position]); diff --git a/src/components/EditDeviceForm.tsx b/src/components/EditDeviceForm.tsx index ccf8ab2..be0c58a 100644 --- a/src/components/EditDeviceForm.tsx +++ b/src/components/EditDeviceForm.tsx @@ -1,6 +1,6 @@ // src/components/EditDeviceForm.tsx -import React, { useState, useEffect } from "react"; +import React, { useState } from "react"; import { Device, Port } from "../types/devices"; interface EditDeviceFormProps { diff --git a/src/hooks/useAudioDeviceStore.ts b/src/hooks/useAudioDeviceStore.ts index f5ee4f6..38a281c 100644 --- a/src/hooks/useAudioDeviceStore.ts +++ b/src/hooks/useAudioDeviceStore.ts @@ -117,6 +117,7 @@ export function useAudioDeviceStore() { return { previousDevices }; }, onError: (err, newTodo, context) => { + console.log("Error updating device position", err, newTodo, context); queryClient.setQueryData(DEVICES_KEY, context?.previousDevices); }, onSettled: () => {