Skip to content

Commit

Permalink
refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshidwivedi committed Jun 22, 2024
1 parent abaf32c commit bc647a9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions modules/room/context/Room.context.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { socket } from "@/common/lib/socket";
import { useSetRoom, useSetUsers } from "@/common/recoil/room/room.hooks";
import usersAtom, { useUserIds } from "@/common/recoil/users";
import { MotionValue, useMotionValue } from "framer-motion";
import { createContext, ReactChild, useEffect } from "react";
Expand All @@ -13,8 +14,8 @@ export const roomContext = createContext<{

const RoomContextProvider = ({ children }: { children: ReactChild }) => {

const setUsers= useSetRecoilState(usersAtom);
const usersIds= useUserIds();
const setRoom = useSetRoom();
const {handleAddUser, handleRemoveUser} = useSetUsers();
const x = useMotionValue(0);
const y = useMotionValue(0);

Expand Down Expand Up @@ -44,4 +45,8 @@ const RoomContextProvider = ({ children }: { children: ReactChild }) => {
</roomContext.Provider>
);
};
export default RoomContextProvider;
export default RoomContextProvider;

function useSetUser(): { handleAddUser: any; handleRemoveUser: any; } {
throw new Error("Function not implemented.");
}

0 comments on commit bc647a9

Please sign in to comment.