improvement: start spliting "MessagesList" in multiple components

This commit is contained in:
canove
2020-09-26 18:53:28 -03:00
parent 1b95595db5
commit 14caaf3895
9 changed files with 492 additions and 127 deletions

View File

@@ -0,0 +1,24 @@
import React from "react";
import { Avatar, CardHeader } from "@material-ui/core";
import { i18n } from "../../translate/i18n";
const TicketInfo = ({ contact, ticket, onClick }) => {
return (
<CardHeader
onClick={onClick}
style={{ cursor: "pointer" }}
titleTypographyProps={{ noWrap: true }}
subheaderTypographyProps={{ noWrap: true }}
avatar={<Avatar src={contact.profilePicUrl} alt="contact_image" />}
title={`${contact.name} #${ticket.id}`}
subheader={
ticket.user &&
`${i18n.t("messagesList.header.assignedTo")} ${ticket.user.name}`
}
/>
);
};
export default TicketInfo;