import React from 'react'; import PropTypes from 'prop-types'; const CardTownHouses = ({result, index}) => { const carouselId = "carouselExampleIndicators".concat(index); const carouselIndicator = "#".concat(carouselId); return( <> { console.log("town houses") }
{result.lastUpdate !=undefined ?
{result.lastUpdate}
:'' }
    {result.images.map((image, i) => (image !== undefined && image.src !==undefined ? i === 1 ?
  1. :
  2. :"" ))}
{ result.images.map((image, i) => (image !== undefined && image.src !== undefined ? i === 0 ?
{i}
:
{i}
:'') ) }
Previous Next
{result.name !== undefined ?

{result.name}

: ''} {result.address != undefined ?

{result.address.street !== undefined ? {result.address.street}, :''} {result.address.city !== undefined ? {result.address.city}, :''} {result.address.zip !== undefined ? {result.address.zip.code} {result.address.zip.state}:''}

: ''} {result.rentInfo !=undefined ?

{result.rentInfo}

:'' }

{result.description !== undefined ? result.description.substr(0,100) + "..." : ''}

{ result.features.slice(0, 8).map((feature, i) =>

{feature}

) }
{ result.contact !== undefined && result.contact.phone != undefined ? {result.contact.phone} : ''} { result.contact !== undefined && result.contact.url ? {result.contact.agentFullName}: '' }
); } CardTownHouses.propTypes = { result: PropTypes.object, index : PropTypes.number } export default CardTownHouses;