added a socket context for real time communication
This commit is contained in:
@@ -2,12 +2,17 @@ import React, { useEffect, useState } from "react";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import ActiveJobs from "../components/MyActiveJobs/ActiveJobs";
|
||||
import usersService from "../services/UsersService";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
/**
|
||||
* This code defines a React functional component called `ManageActiveJobs`.
|
||||
* It fetches a list of active job messages and renders the `ActiveJobs` component with the necessary props.
|
||||
*/
|
||||
function ManageActiveJobs() {
|
||||
const { chatMessageList } = useSelector(
|
||||
(state) => state.tableReload
|
||||
);
|
||||
|
||||
const ApiCall = new usersService();
|
||||
|
||||
const navigate = useNavigate();
|
||||
@@ -54,7 +59,7 @@ function ManageActiveJobs() {
|
||||
}
|
||||
setDetails(state);
|
||||
getActiveJobMesList();
|
||||
}, [activeJobMesListReload]);
|
||||
}, [activeJobMesListReload, chatMessageList]);
|
||||
|
||||
return (
|
||||
<ActiveJobs
|
||||
|
||||
Reference in New Issue
Block a user