import React from 'react';
import PropTypes from 'prop-types';

import EntitiesMap from './map/entities-map';

//destructure props
export default function EntitiesMapComp({entities}){
    if(entities.length>0){
    return (
	<>
	    <h1>Map</h1>
	    <h2>Entity Map</h2>
	    <EntitiesMap entities={entities}/>
	</>
    );
    }else{
	return (
	    <>
		<h1>Map</h1>
		<p>EntitiesMap loading...</p>
	    </>
	);
    }
}
EntitiesMapComp.propTypes = {
    entities: PropTypes.array
};
