From 65cae71860dfc28a41dc42e17600ec7748f4de95 Mon Sep 17 00:00:00 2001 From: Deveshi Dwivedi Date: Thu, 20 Jun 2024 11:33:36 +0530 Subject: [PATCH] add useBoardPosition hook --- modules/room/hooks/useBoardPosition.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 modules/room/hooks/useBoardPosition.ts diff --git a/modules/room/hooks/useBoardPosition.ts b/modules/room/hooks/useBoardPosition.ts new file mode 100644 index 0000000..f35c145 --- /dev/null +++ b/modules/room/hooks/useBoardPosition.ts @@ -0,0 +1,7 @@ + +import { useContext } from "react"; + +export const useBoardPosition = () => { + const { x, y } = useContext(roomContext); + return { x, y }; +}; \ No newline at end of file