diff --git a/app/(platform)/(dashboard)/board/[boardId]/test/cursor.tsx b/app/(platform)/(dashboard)/board/[boardId]/test/cursor.tsx deleted file mode 100644 index 1c44450..0000000 --- a/app/(platform)/(dashboard)/board/[boardId]/test/cursor.tsx +++ /dev/null @@ -1,27 +0,0 @@ -type Props = { - x: number; - y: number; -}; - -export function Cursor({ x, y }: Props) { - return ( - - - - ); -} diff --git a/app/(platform)/(dashboard)/board/[boardId]/test/layout.tsx b/app/(platform)/(dashboard)/board/[boardId]/test/layout.tsx deleted file mode 100644 index b9428b4..0000000 --- a/app/(platform)/(dashboard)/board/[boardId]/test/layout.tsx +++ /dev/null @@ -1,22 +0,0 @@ -'use client'; - -import { ReactNode } from 'react'; -import { RoomProvider } from '@/liveblocks.config'; -import { ClientSideSuspense } from '@liveblocks/react'; -import { useAuth } from '@clerk/nextjs'; - -const Room = ({ children }: { children: ReactNode }) => { - const { orgId } = useAuth(); - - if (!orgId) return null; - - return ( - - Loading…}> - {() => children} - - - ); -} - -export default Room; diff --git a/app/(platform)/(dashboard)/board/[boardId]/test/page.tsx b/app/(platform)/(dashboard)/board/[boardId]/test/page.tsx deleted file mode 100644 index 846951e..0000000 --- a/app/(platform)/(dashboard)/board/[boardId]/test/page.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { useMyPresence, useOthers } from '@/liveblocks.config'; -import { Cursor } from './cursor'; - -const TestPage = () => { - const [myPresence, updateMyPresence] = useMyPresence(); - - const others = useOthers(); - - function handlePointerMove(e: any) { - const cursor = { x: Math.floor(e.clientX), y: Math.floor(e.clientY) }; - updateMyPresence({ cursor }); - } - - function handlePointerLeave() { - updateMyPresence({ cursor: null }); - } - - return ( -
- Cursor: {JSON.stringify(myPresence.cursor)} - {others - .filter((other) => other.presence.cursor !== null) - .map(({ connectionId, presence }) => ( - - ))} -
- ); -}; - -export default TestPage;