|
|
|
@@ -4,14 +4,16 @@ import CardApartments from '../CardApartments/CardApartments' |
|
|
|
import CardHouses from '../CardHouses/CardHouses'; |
|
|
|
import CardTownHouses from '../CardTownHouses/CardTownHouses'; |
|
|
|
const ScrappeResult = ({result, type, index}) => { |
|
|
|
console.log(index); |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<div className='col-lg-12'> |
|
|
|
{ (type !== undefined && type !== null) ? |
|
|
|
{ (type !== undefined && type !== null) ? |
|
|
|
|
|
|
|
(type.value === "apartments") ? <CardApartments index = {index} result={result} /> |
|
|
|
: (type.value === "houses") ? <CardHouses index ={index} result={result} /> |
|
|
|
: <CardTownHouses index={index} result={result} /> |
|
|
|
:'' |
|
|
|
: <CardApartments index = {index} result={result} /> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</> |
|
|
|
@@ -21,6 +23,6 @@ const ScrappeResult = ({result, type, index}) => { |
|
|
|
ScrappeResult.propTypes = { |
|
|
|
result: PropTypes.object, |
|
|
|
type: PropTypes.object, |
|
|
|
index :PropTypes.string |
|
|
|
index :PropTypes.number |
|
|
|
}; |
|
|
|
export default ScrappeResult; |