diff --git a/src/components/modals/OperationDetails.js b/src/components/modals/OperationDetails.js index 0bb58d85..f85fd921 100644 --- a/src/components/modals/OperationDetails.js +++ b/src/components/modals/OperationDetails.js @@ -217,12 +217,12 @@ const OperationDetails = connect(mapStateToProps)((props: Props) => { {t('app:operationDetails.from')} - + {t('app:operationDetails.to')} - + @@ -271,7 +271,7 @@ const More = styled(Text).attrs({ outline: none; ` -export class Recipients extends Component<{ recipients: Array<*>, t: T }, *> { +export class DataList extends Component<{ lines: string[], t: T }, *> { state = { showMore: false, } @@ -279,18 +279,18 @@ export class Recipients extends Component<{ recipients: Array<*>, t: T }, *> { this.setState(({ showMore }) => ({ showMore: !showMore })) } render() { - const { recipients, t } = this.props + const { lines, t } = this.props const { showMore } = this.state // Hardcoded for now const numToShow = 2 - const shouldShowMore = recipients.length > 3 + const shouldShowMore = lines.length > 3 return ( - {(shouldShowMore ? recipients.slice(0, numToShow) : recipients).map(recipient => ( - - {recipient} + {(shouldShowMore ? lines.slice(0, numToShow) : lines).map(line => ( + + {line} - + ))} @@ -299,14 +299,12 @@ export class Recipients extends Component<{ recipients: Array<*>, t: T }, *> { - {t('app:operationDetails.showMore', { recipients: recipients.length - numToShow })} + {t('app:operationDetails.showMore', { recipients: lines.length - numToShow })} )} {showMore && - recipients - .slice(numToShow) - .map(recipient => {recipient})} + lines.slice(numToShow).map(line => {line})} {shouldShowMore && showMore && (