[Bug] Put back subject is email right drawer (#5955)

Fix https://github.com/twentyhq/twenty/issues/5903
This commit is contained in:
Thomas Trompette 2024-06-19 14:48:09 +02:00 committed by GitHub
parent 60b60bd4b3
commit ff21396bc6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,6 +71,7 @@ export const RightDrawerEmailThread = () => {
? visibleMessages.slice(2, visibleMessagesCount - 1)
: [];
const lastMessage = visibleMessages[visibleMessagesCount - 1];
const subject = visibleMessages[0]?.subject;
return (
<StyledContainer>
@ -79,7 +80,7 @@ export const RightDrawerEmailThread = () => {
) : (
<>
<EmailThreadHeader
subject={thread.subject}
subject={subject}
lastMessageSentAt={lastMessage.receivedAt}
/>
{firstMessages.map((message) => (