Rename DocumentListItem::isLast to shouldShowSeparator

This commit is contained in:
Daniel Gasienica 2018-05-08 15:56:10 -04:00
parent 05f67dc04a
commit a8cd0b782e
3 changed files with 28 additions and 20 deletions

View file

@ -49,7 +49,7 @@ export class AttachmentSection extends React.Component<Props, {}> {
const { i18n, messages, type } = this.props;
return messages.map((message, index, array) => {
const isLast = index === array.length - 1;
const shouldShowSeparator = index < array.length - 1;
const { attachments } = message;
const firstAttachment = attachments[0];
@ -70,7 +70,7 @@ export class AttachmentSection extends React.Component<Props, {}> {
fileName={firstAttachment.fileName}
fileSize={firstAttachment.size}
i18n={i18n}
isLast={isLast}
shouldShowSeparator={shouldShowSeparator}
onClick={onClick}
timestamp={message.received_at}
/>