index.js 548 B

1234567891011121314151617181920212223
  1. // jshint ignore:start
  2. import React from 'react';
  3. import Row from './row';
  4. import batch from 'misago/utils/batch';
  5. export default function(props) {
  6. return (
  7. <div className="participants-cards">
  8. {batch(props.participants, 4).map((row) => {
  9. const key = row.map((i) => i.id).join('_');
  10. return (
  11. <Row
  12. key={key}
  13. participants={row}
  14. thread={props.thread}
  15. user={props.user}
  16. userIsOwner={props.userIsOwner}
  17. />
  18. );
  19. })}
  20. </div>
  21. );
  22. }