CFE-5 config socket provider

This commit is contained in:
AmirHossein Mahmoodi
2023-10-02 10:09:05 +03:30
parent 27b166c11c
commit 3992502b94
3 changed files with 3 additions and 2 deletions

View File

@@ -10,5 +10,6 @@ export const SocketProvider = ({children}) => {
token: ""
}
}), [])
return <SocketContext.Provider value={{socket}}>{children}</SocketContext.Provider>
}

View File

@@ -4,7 +4,7 @@ import {SocketContext} from "@/lib/app/contexts/socket";
const useSocket = () => {
const {socket} = useContext(SocketContext)
return {socket}
return socket
}
export default useSocket