diff --git a/GUI/package.json b/GUI/package.json index 3f746ca2..bb72c676 100644 --- a/GUI/package.json +++ b/GUI/package.json @@ -11,7 +11,7 @@ "prettier": "prettier --write \"{,!(node_modules)/**/}*.{ts,tsx,js,json,css,less,scss}\"" }, "dependencies": { - "@buerokratt-ria/header": "^0.1.17", + "@buerokratt-ria/header": "^0.1.18", "@buerokratt-ria/menu": "^0.2.4", "@buerokratt-ria/styles": "^0.0.1", "@fontsource/roboto": "^4.5.8", diff --git a/GUI/src/pages/Chat/ChatActive/index.tsx b/GUI/src/pages/Chat/ChatActive/index.tsx index 769298d4..4d390dff 100644 --- a/GUI/src/pages/Chat/ChatActive/index.tsx +++ b/GUI/src/pages/Chat/ChatActive/index.tsx @@ -16,7 +16,6 @@ import StartAServiceModal from '../StartAServiceModal'; import ChatTrigger from './ChatTrigger'; import { v4 as uuidv4 } from 'uuid'; import { useLocation } from 'react-router-dom'; -import sse from 'services/sse-service'; import './ChatActive.scss'; import withAuthorization from 'hoc/with-authorization'; import { ROLES } from 'utils/constants'; @@ -58,11 +57,6 @@ const ChatActive: FC = () => { useHeaderStore.getState().loadActiveChats(); }, []); - useEffect(() => { - const events = sse(`/chat-list`, loadActiveChats); - return () => events.close(); - }, []); - const { data: csaNameVisiblity } = useQuery<{ isVisible: boolean }>({ queryKey: ['agents/admin/name-visibility', 'prod'], }); diff --git a/GUI/src/pages/Chat/ChatPending/index.tsx b/GUI/src/pages/Chat/ChatPending/index.tsx index a67a602d..00ccf8c0 100644 --- a/GUI/src/pages/Chat/ChatPending/index.tsx +++ b/GUI/src/pages/Chat/ChatPending/index.tsx @@ -12,7 +12,6 @@ import ChatTrigger from '../ChatActive/ChatTrigger'; import clsx from 'clsx'; import ForwardToColleaugeModal from '../ForwardToColleaugeModal'; import ForwardToEstablishmentModal from '../ForwardToEstablishmentModal'; -import sse from 'services/sse-service'; import { v4 as uuidv4 } from 'uuid'; import './ChatPending.scss'; import { userStore as useHeaderStore } from '@buerokratt-ria/header'; @@ -49,11 +48,6 @@ const ChatPending: FC = () => { useHeaderStore.getState().loadPendingChats(); }, []); - useEffect(() => { - const events = sse(`/chat-list`, loadPendingChats); - return () => events.close(); - }, []); - const { data: csaNameVisiblity } = useQuery<{ isVisible: boolean }>({ queryKey: ['agents/admin/name-visibility', 'prod'], }); diff --git a/GUI/src/pages/Chat/ChatUnanswered/index.tsx b/GUI/src/pages/Chat/ChatUnanswered/index.tsx index 2dd277fb..22deccbb 100644 --- a/GUI/src/pages/Chat/ChatUnanswered/index.tsx +++ b/GUI/src/pages/Chat/ChatUnanswered/index.tsx @@ -14,7 +14,6 @@ import ChatTrigger from '../ChatActive/ChatTrigger'; import clsx from 'clsx'; import ForwardToColleaugeModal from '../ForwardToColleaugeModal'; import ForwardToEstablishmentModal from '../ForwardToEstablishmentModal'; -import sse from 'services/sse-service'; import './ChatUnanswered.scss'; import withAuthorization from 'hoc/with-authorization'; import { ROLES } from 'utils/constants'; @@ -51,11 +50,6 @@ const ChatUnanswered: FC = () => { useHeaderStore.getState().loadActiveChats(); }, []); - useEffect(() => { - const events = sse(`/chat-list`, loadActiveChats); - return () => events.close(); - }, []); - const { data: csaNameVisiblity } = useQuery<{ isVisible: boolean }>({ queryKey: ['agents/admin/name-visibility', 'prod'], }); diff --git a/GUI/src/pages/Chat/ValidationRequests/index.tsx b/GUI/src/pages/Chat/ValidationRequests/index.tsx index d5aef720..68399a12 100644 --- a/GUI/src/pages/Chat/ValidationRequests/index.tsx +++ b/GUI/src/pages/Chat/ValidationRequests/index.tsx @@ -24,7 +24,6 @@ import { useToast } from 'hooks/useToast'; import { apiDev } from 'services/api'; import { AxiosError } from 'axios'; import { userStore as useHeaderStore } from '@buerokratt-ria/header'; -import sse from 'services/sse-service'; import MessageContentView from './MessageContentView'; import { MdOutlineRemoveRedEye } from 'react-icons/md'; import { Chat as ChatType } from 'types/chat'; @@ -52,11 +51,6 @@ const ValidationRequests: React.FC = () => { useHeaderStore.getState().loadValidationMessages(); }, []); - useEffect(() => { - const events = sse(`/chat-list`, loadValidationMessages); - return () => events.close(); - }, []); - const approveMessage = useMutation({ mutationFn: (data: { chatId: string; messageId: string }) => { return apiDev.post(`chats/messages/approve-validation`, {