Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gocemitevski committed Oct 13, 2023
1 parent 4362298 commit 330620d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/components/CanvasBackground/CanvasBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ export const CanvasBackground: React.FunctionComponent<
fileImage: files[0],
});
if (dragAndDropContainer.current) {
dragAndDropContainer.current.children[0].classList.remove("border-success");
dragAndDropContainer.current.children[0].classList.remove(
"border-success"
);
}
},
[canvasBackgroundValues, setCanvasBackgroundValues]
Expand All @@ -77,7 +79,9 @@ export const CanvasBackground: React.FunctionComponent<
const handleDragLeave = useCallback((e: React.DragEvent<HTMLDivElement>) => {
e.preventDefault();
if (dragAndDropContainer.current) {
dragAndDropContainer.current.children[0].classList.remove("border-success");
dragAndDropContainer.current.children[0].classList.remove(
"border-success"
);
}
}, []);

Expand Down
8 changes: 6 additions & 2 deletions src/components/CanvasIcon/CanvasIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export const CanvasIcon: React.FunctionComponent<CanvasIconProps> = (props) => {
const files = Array.from(e.dataTransfer.files);
setCanvasIconValues({ ...canvasIconValues, fileImage: files[0] });
if (dragAndDropContainer.current) {
dragAndDropContainer.current.children[0].classList.remove("border-success");
dragAndDropContainer.current.children[0].classList.remove(
"border-success"
);
}
},
[canvasIconValues, setCanvasIconValues]
Expand All @@ -79,7 +81,9 @@ export const CanvasIcon: React.FunctionComponent<CanvasIconProps> = (props) => {
const handleDragLeave = useCallback((e: React.DragEvent<HTMLDivElement>) => {
e.preventDefault();
if (dragAndDropContainer.current) {
dragAndDropContainer.current.children[0].classList.remove("border-success");
dragAndDropContainer.current.children[0].classList.remove(
"border-success"
);
}
}, []);

Expand Down

0 comments on commit 330620d

Please sign in to comment.