Started palette editor.
Test and Build / test-and-build (push) Failing after 1m47s

Cleaned up tests and lint errors.
Upgraded npm packages.
This commit is contained in:
Jay
2026-03-19 18:54:44 -04:00
parent 6be2d9e41a
commit 9fec89949b
36 changed files with 1484 additions and 1229 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState } from "react";
import { useEffect, useMemo, useRef, useState } from "react";
import type { CartesianSpace } from "@/types";
import { valueToPosition } from "@/util";
@@ -12,8 +12,8 @@ function TestSquare() {
const [dimensions, setDimensions] = useState<CartesianSpace>({ x: 0, y: 0 });
const [xValue, setXValue] = useState(0);
const [yValue, setYValue] = useState(0);
const xValueRange = { min: 0, max: 100 };
const yValueRange = { min: 0, max: 100 };
const xValueRange = useMemo(() => ({ min: 0, max: 100 }), []);
const yValueRange = useMemo(() => ({ min: 0, max: 100 }), []);
const [xPosition, setXPosition] = useState(0);
const [yPosition, setYPosition] = useState(0);
@@ -46,7 +46,7 @@ function TestSquare() {
const newYPos = valueToPosition(yValue, dimensions.y - 1, yValueRange);
setXPosition(newXPos);
setYPosition(newYPos);
}, [xValue, yValue]);
}, [xValue, yValue, dimensions.x, dimensions.y, xValueRange, yValueRange]);
return (
<>