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

@@ -7,7 +7,7 @@ NEXT_PUBLIC_PRIMARY_MAIN = "#1b4332"
NEXT_PUBLIC_SECONDARY_MAIN = "#800e13"
NEXT_PUBLIC_BASE_URL = "https://crm.witel.ir"
NEXT_PUBLIC_SERVER_SOCKET_URL = "wss://crm.witel.ir"
NEXT_PUBLIC_SERVER_SOCKET_URL = "wss://crmws.witel.ir"
NEXT_PUBLIC_POWERED_BY_URL = "https://witel.ir"
NODE_ENV = "development"

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