| @@ -67,9 +67,12 @@ const ItemDetailsHeaderCard = (props) => { | |||
| const messageUser = (offer) => { | |||
| const chatItem = chats.find((item) => item.offer._id === offer?._id); | |||
| if (chatItem !== undefined) { | |||
| history.push(DIRECT_CHAT_PAGE, { | |||
| chatId: chatItem._id, | |||
| }); | |||
| console.log(chatItem); | |||
| history.push( | |||
| replaceInRoute(DIRECT_CHAT_PAGE, { | |||
| chatId: chatItem._id, | |||
| }) | |||
| ); | |||
| } else { | |||
| if (offer?.user?._id !== userId) { | |||
| history.push({ | |||