import React, { createContext } from "react";
import useSocket from "./useSocket"; // Import the custom hook

// Create the SocketContext
const SocketContext = createContext(null);

export const SocketProvider = ({ children, bodyshop }) => {
  const { socket, clientId } = useSocket(bodyshop);

  return <SocketContext.Provider value={{ socket, clientId }}> {children}</SocketContext.Provider>;
};

export default SocketContext;
