score:0

The data is in props.

When data is passed to child component via props, then it is part of props child component. Try below and see if you can console log the data.

const ShoppingCart = props => {
  console.log(props.parkingSlots);
  const parkingSlotsComponent = props.parkingSlots.map((parkingSlot, i) => {
  // const { name } = parkingSlot;
  return (
    <div className="parking_details" key={i}>
      {props.parkingSlot.name}
    </div>
  );
});
return <div className="checkout">{parkingSlotsComponent}</div>;
 };

Related Query

More Query from same tag