| import { selectIsLoadingByActionType } from "../../store/selectors/loadingSelectors"; | import { selectIsLoadingByActionType } from "../../store/selectors/loadingSelectors"; | ||||
| import { CHAT_SCOPE } from "../../store/actions/chat/chatActionConstants"; | import { CHAT_SCOPE } from "../../store/actions/chat/chatActionConstants"; | ||||
| import { | import { | ||||
| selectJwtToken, | |||||
| selectUserId, | selectUserId, | ||||
| } from "../../store/selectors/loginSelectors"; | } from "../../store/selectors/loginSelectors"; | ||||
| import { | import { | ||||
| const location = useLocation(); | const location = useLocation(); | ||||
| const dispatch = useDispatch(); | const dispatch = useDispatch(); | ||||
| const { t } = useTranslation(); | const { t } = useTranslation(); | ||||
| const token = useSelector(selectJwtToken); | |||||
| const exchange = useSelector(selectExchange); | const exchange = useSelector(selectExchange); | ||||
| const requester = useSelector(selectRequester); | const requester = useSelector(selectRequester); | ||||
| chat?._id, | chat?._id, | ||||
| userId, | userId, | ||||
| chat?.participants[interlocutor]._id, | chat?.participants[interlocutor]._id, | ||||
| token, | |||||
| () => { | () => { | ||||
| dispatch( | dispatch( | ||||
| addNewMessage({ | addNewMessage({ |