CFE-5 initialize socket provider

This commit is contained in:
AmirHossein Mahmoodi
2023-10-01 10:44:28 +03:30
parent d22650c176
commit 27b166c11c
5 changed files with 43 additions and 14 deletions

View File

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