mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-18 02:20:47 -04:00
first lol
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// src/context/SocketContext.jsx
|
||||
import { createContext, useContext } from "react";
|
||||
import { socket } from "../lib/socket";
|
||||
|
||||
const SocketContext = createContext(socket);
|
||||
export const SocketProvider = ({ children }) => (
|
||||
<SocketContext.Provider value={socket}>{children}</SocketContext.Provider>
|
||||
);
|
||||
export const useSocket = () => useContext(SocketContext);
|
||||
Reference in New Issue
Block a user