initial commit
This commit is contained in:
@@ -32,7 +32,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
);
|
||||
|
||||
const {
|
||||
userDetails: { username, uid, session, account_type },
|
||||
userDetails: { username, uid, session, account_type, parent_uid },
|
||||
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
||||
|
||||
let loggedIn = username && session && uid ? true : false; // variable to determine if user is logged in
|
||||
@@ -323,6 +323,11 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
joinRoom('full-markets-jobs')
|
||||
},[isLogin.status])
|
||||
|
||||
useEffect(()=>{ // sends an event to the socket to enable user join a room to be able to receive update for parent child job assign
|
||||
joinRoom(`FAMILY-${account_type == 'FULL' ? uid : parent_uid}`)
|
||||
console.log(`Room joined for parent child task assign as ${account_type} with ${account_type == 'FULL' ? uid : parent_uid}}, => ${uid}, ${parent_uid}`)
|
||||
},[isLogin.status])
|
||||
|
||||
|
||||
// RENDER PAGE
|
||||
return isLogin.loading && !loggedIn ? (
|
||||
|
||||
Reference in New Issue
Block a user