23 lines
686 B
JavaScript
23 lines
686 B
JavaScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
import { createStructuredSelector } from "reselect";
|
|
import { openConversation } from "../../redux/messaging/messaging.actions";
|
|
import { MessageFilled } from "@ant-design/icons";
|
|
const mapStateToProps = createStructuredSelector({
|
|
//currentUser: selectCurrentUser
|
|
});
|
|
const mapDispatchToProps = dispatch => ({
|
|
openConversation: phone => dispatch(openConversation(phone))
|
|
});
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(function ChatOpenButton({ openConversation, phone }) {
|
|
return (
|
|
<MessageFilled
|
|
style={{ margin: 4 }}
|
|
onClick={() => openConversation(phone)}
|
|
/>
|
|
);
|
|
});
|