Refactor MessageRecord component to replace ckchat store with customer store for improved data handling. This change enhances the retrieval of customer information based on the wechatAccountId, streamlining the message processing logic.
This commit is contained in:
@@ -13,7 +13,7 @@ import { getEmojiPath } from "@/components/EmojiSeclection/wechatEmoji";
|
||||
import styles from "./com.module.scss";
|
||||
import { useWeChatStore } from "@/store/module/weChat/weChat";
|
||||
import { useContactStore } from "@/store/module/weChat/contacts";
|
||||
import { useCkChatStore } from "@/store/module/ckchat/ckchat";
|
||||
import { useCustomerStore } from "@weChatStore/customer";
|
||||
import { fetchReCallApi, fetchVoiceToTextApi } from "./api";
|
||||
import TransmitModal from "./components/TransmitModal";
|
||||
|
||||
@@ -45,8 +45,8 @@ const MessageRecord: React.FC<MessageRecordProps> = ({ contract }) => {
|
||||
const prevMessagesRef = useRef(currentMessages);
|
||||
const updateShowCheckbox = useWeChatStore(state => state.updateShowCheckbox);
|
||||
const updateEnterModule = useWeChatStore(state => state.updateEnterModule);
|
||||
const currentKf = useCkChatStore(state =>
|
||||
state.kfUserList.find(kf => kf.id === contract.wechatAccountId),
|
||||
const currentKf = useCustomerStore(state =>
|
||||
state.customerList.find(kf => kf.id === contract.wechatAccountId),
|
||||
);
|
||||
|
||||
const updateSelectedChatRecords = useWeChatStore(
|
||||
|
||||
Reference in New Issue
Block a user