Refactored Messaging as a part of BOD-14. Breaking changes remain.
This commit is contained in:
@@ -1,22 +1,16 @@
|
||||
import { MessageFilled } from "@ant-design/icons";
|
||||
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)),
|
||||
});
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
openConversation: phone => dispatch(openConversation(phone))
|
||||
});
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(function ChatOpenButton({ openConversation, phone }) {
|
||||
export function ChatOpenButton({ phone }) {
|
||||
return (
|
||||
<MessageFilled
|
||||
style={{ margin: 4 }}
|
||||
onClick={() => openConversation(phone)}
|
||||
onClick={() => alert("TODO FIX ME" + phone)}
|
||||
/>
|
||||
);
|
||||
});
|
||||
}
|
||||
export default connect(null, mapDispatchToProps)(ChatOpenButton);
|
||||
|
||||
Reference in New Issue
Block a user