import React from 'react';
import { WorldItem } from '@game/components/WorldItem';
import type { MapChunk } from '@game/struct/chunk';

interface Props {
  chunk: MapChunk;
}

export function WorldChunk(props: Props) {
  const { chunk } = props;

  return (
    <>
      {chunk.regions.map((item) => {
        return <WorldItem key={item.key} item={item} />;
      })}
    </>
  );
}
