changed the value of REACT_APP_PRIMARY_SOCKET in env production file

This commit was merged in pull request #18.
This commit is contained in:
victorAnumudu
2024-03-15 13:13:11 +01:00
parent 3f6cb6afba
commit 6046401aa2
4 changed files with 7 additions and 35 deletions
+1 -1
View File
@@ -22,4 +22,4 @@ REACT_APP_SUPPORT_NG_ADDRESS='Saka Tinubu Street, Victoria Island Lagos, Nigeria
REACT_APP_AGENT_LINK='https://agents.wrenchboard.com'
#SOCKETS ENDS
REACT_APP_PRIMARY_SOCKET="https://socket.wrenchboard.com"
REACT_APP_PRIMARY_SOCKET="https://socket-dev.wrenchboard.com"
-1
View File
@@ -11,7 +11,6 @@ function App() {
useEffect(()=>{ // sends an event to the socket to enable user join a room to be able to receive update when jobs enters the market
joinRoom('full-markets-jobs')
console.log('market room joined')
},[])
return (
-1
View File
@@ -25,7 +25,6 @@ export default function SocketIOContextProvider({children}) {
useEffect(() => {
socket.on("received_refreshmarket_jobs", (data) => {
setSocketMsgReceived({type: 'market', msg: data?.message});
console.log('YES ssss')
});
}, [socket]);
+6 -32
View File
@@ -18,21 +18,6 @@ let CurrentJobsHero = () => {
let [jobs, setJobs] = useState([])
// constructor() {
// // debugger;
// super();
// this.state = { jobsDataResults: [] };
// }
// async componentDidMount(){
// // debugger;
// JobsData().then(res => {
// this.setState({jobsDataResults:res.data.result_list});
// }).catch(err => {
// console.log('startjoblist error', err)
// })
// }
function titleLen(title){
let maxl = 45;
title.replace('/', ' ');
@@ -44,24 +29,13 @@ let CurrentJobsHero = () => {
}
useEffect(()=>{
if(socketMsgReceived.type == '' || socketMsgReceived.type == 'market'){
JobsData().then(res => {
setJobs(res.data.result_list);
}).catch(err => {
console.log('startjoblist error', err)
})
}
},[socketMsgReceived.type])
JobsData().then(res => {
setJobs(res.data.result_list);
}).catch(err => {
console.log('startjoblist error', err)
})
},[socketMsgReceived])
// if ( this.state.jobsDataResults== undefined ){
// return null;
// }
// if (this.state.jobsDataResults.length == 0){
// return <></>;
// }
return (
<>
{jobs.length < 1 ?