Skip to content

Commit

Permalink
Stop setting null items to cursor background
Browse files Browse the repository at this point in the history
  • Loading branch information
zachpmanson committed Feb 2, 2024
1 parent c59678c commit 5e455ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/components/CraftingTable.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/components/Cursor.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ export default function Cursor() {
return document.removeEventListener("mousemove", (e) => {});
}, []);

const backgroundItem = cursorItem ? `url(${cursorItem && items[cursorItem].icon})` : undefined;

return (
<div
id="cursor"
style={{
...cursorPosition,
backgroundImage: `url(${cursorItem && items[cursorItem].icon})`,
backgroundImage: backgroundItem,
}}
></div>
);
Expand Down

0 comments on commit 5e455ce

Please sign in to comment.