import { MessageOutlined } from "@ant-design/icons"; import { Badge, Card } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { toggleChatVisible } from "../../redux/messaging/messaging.actions"; import { selectChatVisible } from "../../redux/messaging/messaging.selectors"; import ChatPopupComponent from '../chat-popup/chat-popup.component' const mapStateToProps = createStructuredSelector({ chatVisible: selectChatVisible, }); const mapDispatchToProps = (dispatch) => ({ toggleChatVisible: () => dispatch(toggleChatVisible()), }); export function ChatAffixComponent({ chatVisible, toggleChatVisible, conversationList, unreadCount, }) { const { t } = useTranslation(); return ( {chatVisible ? ( ) : (
toggleChatVisible()} style={{ cursor: "pointer" }}> {t("messaging.labels.messaging")}
)}
); } export default connect(mapStateToProps, mapDispatchToProps)(ChatAffixComponent);