added a socket context for real time communication

This commit is contained in:
victorAnumudu
2024-03-12 16:31:08 +01:00
parent c22cffd167
commit f291382786
6 changed files with 96 additions and 10 deletions
+6 -1
View File
@@ -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