import React from 'react'; import { chunk } from 'lodash'; import { usePointCursor } from '../../store/pointCursor'; import { Row } from './Base'; import RenderedPoint from './RenderedPoint'; const PointList = function(props) { const { setPointCursor } = usePointCursor(); const { routeHandler, points, loading } = props; const chunks = chunk(points, 3); return points.length === 0 ? (

{loading ? 'Loading...' : 'No points to display'}

) : ( chunks.map((chunk, idx) => ( {chunk.map(point => ( ))} )) ); }; export default PointList;