diff --git a/modules/room/components/Room.tsx b/modules/room/components/Room.tsx index 7c8f496..6930b89 100644 --- a/modules/room/components/Room.tsx +++ b/modules/room/components/Room.tsx @@ -1,9 +1,9 @@ import { useRoom} from "@/common/recoil/room"; import RoomContextProvider from "../context/Room.context"; -import Canvas from "./Canvas"; -import { MousePosition } from "./MousePosition"; -import MouseRenderer from "./MouseRenderer"; +import Canvas from "./board/Canvas"; +import { MousePosition } from "./board/MousePosition"; +import MouseRenderer from "./board/MouseRenderer"; import { ToolBar } from "./toolbar/ToolBar"; import NameInput from "./NameInput"; import UsersList from "./UsersList"; diff --git a/modules/room/components/Canvas.tsx b/modules/room/components/board/Canvas.tsx similarity index 96% rename from modules/room/components/Canvas.tsx rename to modules/room/components/board/Canvas.tsx index eee1085..89a55a8 100644 --- a/modules/room/components/Canvas.tsx +++ b/modules/room/components/board/Canvas.tsx @@ -8,16 +8,16 @@ import { useRef, useState, useEffect } from "react"; import { useKeyPressEvent } from "react-use"; -import { useDraw } from "../hooks/useDraw"; +import { useDraw } from "@/common/hooks/drawing"; -import { useSocketDraw } from "../hooks/useSocketDraw"; +import { useSocketDraw } from "../../hooks/useSocketDraw"; import { socket } from "@/common/lib/socket"; import Minimap from "./Minimap"; import room, { useRoom } from "@/common/recoil/room"; -import { drawAllMoves } from "../helpers/Canvas.helpers"; +import { drawAllMoves } from "../../helpers/Canvas.helpers"; const Canvas = () => { diff --git a/modules/room/components/Minimap.tsx b/modules/room/components/board/Minimap.tsx similarity index 97% rename from modules/room/components/Minimap.tsx rename to modules/room/components/board/Minimap.tsx index 1cfb078..7e4a3b1 100644 --- a/modules/room/components/Minimap.tsx +++ b/modules/room/components/board/Minimap.tsx @@ -3,7 +3,7 @@ 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"; +import { useBoardPosition } from "../../hooks/useBoardPosition"; const Minimap = forwardRef< diff --git a/modules/room/components/MousePosition.tsx b/modules/room/components/board/MousePosition.tsx similarity index 94% rename from modules/room/components/MousePosition.tsx rename to modules/room/components/board/MousePosition.tsx index 109714c..3202ebc 100644 --- a/modules/room/components/MousePosition.tsx +++ b/modules/room/components/board/MousePosition.tsx @@ -1,5 +1,5 @@ import { useRef } from "react"; -import { useBoardPosition } from "../hooks/useBoardPosition"; +import { useBoardPosition } from "../../hooks/useBoardPosition"; import { useInterval, useMouse } from "react-use"; import { socket } from "@/common/lib/socket"; import { motion } from "framer-motion"; diff --git a/modules/room/components/MouseRenderer.tsx b/modules/room/components/board/MouseRenderer.tsx similarity index 100% rename from modules/room/components/MouseRenderer.tsx rename to modules/room/components/board/MouseRenderer.tsx diff --git a/modules/room/components/UserMouse.tsx b/modules/room/components/board/UserMouse.tsx similarity index 96% rename from modules/room/components/UserMouse.tsx rename to modules/room/components/board/UserMouse.tsx index fe0b510..a4ddbe2 100644 --- a/modules/room/components/UserMouse.tsx +++ b/modules/room/components/board/UserMouse.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { useBoardPosition } from "../hooks/useBoardPosition"; +import { useBoardPosition } from "../../hooks/useBoardPosition"; import { socket } from "@/common/lib/socket"; import { motion } from "framer-motion"; import { BsCursorFill } from "react-icons/bs";