diff --git a/modules/room/components/Canvas.tsx b/modules/room/components/Canvas.tsx index f28e66b..86f6de6 100644 --- a/modules/room/components/Canvas.tsx +++ b/modules/room/components/Canvas.tsx @@ -87,7 +87,7 @@ const Canvas = () => { }, [drawing, ctx]); return ( -
+
{ /> diff --git a/modules/room/components/Minimap.tsx b/modules/room/components/Minimap.tsx index 4c67675..05d3476 100644 --- a/modules/room/components/Minimap.tsx +++ b/modules/room/components/Minimap.tsx @@ -3,16 +3,16 @@ import { useViewportSize } from "@/common/hooks/useViewportSize"; import { MotionValue, useMotionValue } from "framer-motion"; import {Dispatch, SetStateAction, forwardRef, useEffect, useRef} from "react"; import {motion} from "framer-motion"; +import { useBoardPosition } from "../hooks/useBoardPosition"; const Minimap = forwardRef< HTMLCanvasElement,{ - x: MotionValue; - y: MotionValue; dragging: boolean; setMovedMiniMap: Dispatch>; } ->(({x, y, dragging, setMovedMiniMap}, ref)=>{ +>(({ dragging, setMovedMiniMap}, ref)=>{ + const {x,y} = useBoardPosition(); const containerRef = useRef(null); const {width, height} = useViewportSize();