import React, { memo } from 'react';
import GalleryGroupItem from './GalleryGroupItem';
import styles from './GalleryGroup.less';

function GalleryGroup({ list = [], addComponent }: { list: any[]; addComponent: () => any }) {
  return (
    <ul className={styles.sublist}>
      {list.map((base) => {
        return <GalleryGroupItem key={base.id} base={base} addComponent={addComponent} />;
      })}
    </ul>
  );
}

export default memo(GalleryGroup);
