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:
+1
-1
@@ -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"
|
||||
@@ -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 (
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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 ?
|
||||
|
||||
Reference in New Issue
Block a user