import {Container} from '@pixi/react';

import Entity from './entity.jsx';

export default function Entities({entities}) {
  const renderables = [];
  for (const id in entities) {
    renderables.push(
      <Entity
        entity={entities[id]}
        key={id}
      />
    );
  }
  return (
    <Container
      sortableChildren
    >
      {renderables}
    </Container>
  );
}