Skip to content

Commit

Permalink
fixed resize issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritika Mishra committed Dec 30, 2024
1 parent 86d8762 commit 461bff5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/components/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,18 +382,6 @@ const Canvas = forwardRef(

}, [animate]);

useEffect(() => {
const handleResize = () => {
createCanvases();
};

window.addEventListener("resize", handleResize);

return () => {
window.removeEventListener("resize", handleResize);
};
}, [createCanvases,]);

return (
<main className=" flex flex-col flex-[1_1_0%] min-h-80 bg-highlight rounded-2xl m-4 relative"
ref={canvasContainerRef}
Expand Down

0 comments on commit 461bff5

Please sign in to comment.