Refactored Messaging as a part of BOD-14. Breaking changes remain.

This commit is contained in:
Patrick Fic
2020-04-29 16:46:23 -07:00
parent 0bc8d95120
commit dcfcf71ca4
24 changed files with 393 additions and 549 deletions

View File

@@ -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);