From 5e455cedba71c79fd019da4c97bb2f1072e0b24b Mon Sep 17 00:00:00 2001 From: Zach Manson Date: Sat, 3 Feb 2024 08:48:43 +1100 Subject: [PATCH] Stop setting null items to cursor background --- src/components/CraftingTable.component.tsx | 1 - src/components/Cursor.component.tsx | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/CraftingTable.component.tsx b/src/components/CraftingTable.component.tsx index 97836f8..ffccd7d 100644 --- a/src/components/CraftingTable.component.tsx +++ b/src/components/CraftingTable.component.tsx @@ -29,7 +29,6 @@ export default function CraftingTable({ const colorTable = colorTables[tableNum]; const currentTable = craftingTables[tableNum]; - console.log(currentTable); const [isDown, setIsDown] = useState(false); // TODO: remove this const [isDragging, setIsDragging] = useState(false); diff --git a/src/components/Cursor.component.tsx b/src/components/Cursor.component.tsx index caa9d2c..ab5e91c 100644 --- a/src/components/Cursor.component.tsx +++ b/src/components/Cursor.component.tsx @@ -14,12 +14,14 @@ export default function Cursor() { return document.removeEventListener("mousemove", (e) => {}); }, []); + const backgroundItem = cursorItem ? `url(${cursorItem && items[cursorItem].icon})` : undefined; + return (
);