diff --git a/.env.production b/.env.production index 1d3d6b3..c432cdc 100644 --- a/.env.production +++ b/.env.production @@ -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" \ No newline at end of file +REACT_APP_PRIMARY_SOCKET="https://socket-dev.wrenchboard.com" \ No newline at end of file diff --git a/src/App.js b/src/App.js index 20cf080..4e2d723 100644 --- a/src/App.js +++ b/src/App.js @@ -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 ( diff --git a/src/Contexts/SocketIOContext.js b/src/Contexts/SocketIOContext.js index d39048b..d9b699d 100644 --- a/src/Contexts/SocketIOContext.js +++ b/src/Contexts/SocketIOContext.js @@ -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]); diff --git a/src/components/HomeOne/CurrentJobsHero.js b/src/components/HomeOne/CurrentJobsHero.js index ac67d01..51aaf0d 100644 --- a/src/components/HomeOne/CurrentJobsHero.js +++ b/src/components/HomeOne/CurrentJobsHero.js @@ -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 ?