feature/IO-3291-Tasks-Notifications: Final
This commit is contained in:
@@ -9,7 +9,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { FaTasks } from "react-icons/fa";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { useSocket } from "../../contexts/SocketIO/useSocket.js";
|
||||
import { TASKS_CENTER_POLL_INTERVAL, useSocket } from "../../contexts/SocketIO/useSocket.js";
|
||||
import { GET_UNREAD_COUNT } from "../../graphql/notifications.queries.js";
|
||||
import { QUERY_MY_TASKS_COUNT } from "../../graphql/tasks.queries.js";
|
||||
import { selectRecentItems, selectSelectedHeader } from "../../redux/application/application.selectors";
|
||||
@@ -76,7 +76,7 @@ function useIncompleteTaskCount(assignedToId, bodyshopId, isEmployee, isConnecte
|
||||
variables: { assigned_to: assignedToId, bodyshopid: bodyshopId },
|
||||
skip: !assignedToId || !bodyshopId || !isEmployee,
|
||||
fetchPolicy: "network-only",
|
||||
pollInterval: isConnected ? 0 : day.duration(60, "seconds").asMilliseconds()
|
||||
pollInterval: isConnected ? 0 : TASKS_CENTER_POLL_INTERVAL
|
||||
});
|
||||
|
||||
const incompleteTaskCount = taskCountData?.tasks_aggregate?.aggregate?.count ?? 0;
|
||||
|
||||
Reference in New Issue
Block a user