Bladeren bron

Fixed 2122

bugfix/2122
jovan.cirkovic 3 jaren geleden
bovenliggende
commit
eb1345e060

+ 3
- 1
src/components/Cards/ItemDetailsCard/ItemDetailsCard.js Bestand weergeven

toggleDeleteOfferModal, toggleDeleteOfferModal,
toggleEditOfferModal, toggleEditOfferModal,
} from "../../../store/actions/modal/modalActions"; } from "../../../store/actions/modal/modalActions";
import { fetchChats } from "../../../store/actions/chat/chatActions";


const ItemDetailsCard = (props) => { const ItemDetailsCard = (props) => {
// const offer = props.offer; // const offer = props.offer;
const date = formatDateLocale(new Date(offer?._created)); const date = formatDateLocale(new Date(offer?._created));


const startExchange = () => { const startExchange = () => {
dispatch(fetchChats({ userId: userId, offerId: props.offer._id }));
startChat(chats, offer, userId); startChat(chats, offer, userId);
}; };


); );
}; };


console.log(props)
console.log(props);
return ( return (
<> <>
<ItemDetailsCardContainer <ItemDetailsCardContainer

+ 1
- 3
src/components/DirectChat/DirectChat.js Bestand weergeven

import SkeletonDirectChat from "./SkeletonDirectChat/SkeletonDirectChat"; import SkeletonDirectChat from "./SkeletonDirectChat/SkeletonDirectChat";
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 {
selectUserId,
} from "../../store/selectors/loginSelectors";
import { selectUserId } from "../../store/selectors/loginSelectors";
import { import {
acceptExchangeSocket, acceptExchangeSocket,
addMessageListener, addMessageListener,

+ 2
- 2
src/components/Header/UserButton/UserButton.js Bestand weergeven



const UserButton = (props) => { const UserButton = (props) => {
const location = useLocation(); const location = useLocation();
const {t} = useTranslation();
const { t } = useTranslation();
const [userPopoverOpen, setUserPopoverOpen] = useState(false); const [userPopoverOpen, setUserPopoverOpen] = useState(false);
const [userAnchorEl, setUserAnchorEl] = useState(null); const [userAnchorEl, setUserAnchorEl] = useState(null);


color: selectedTheme.colors.primaryPurple, color: selectedTheme.colors.primaryPurple,
}} }}
> >
<AccountCircle />
<AccountCircle onClick={openUserPopover} />
</IconButton> </IconButton>
</UserButtonContainer> </UserButtonContainer>
<PopoverComponent <PopoverComponent

+ 1
- 1
src/store/saga/chatSaga.js Bestand weergeven

_id: newChatId, _id: newChatId,
message: { message: {
user: { user: {
_id: userId
_id: userId,
}, },
text: payload.payload.message, text: payload.payload.message,
_created: new Date().toISOString(), _created: new Date().toISOString(),

Laden…
Annuleren
Opslaan