1
I created a component that there are six images but when compiling my code returns me the following error.
And this is my source code for the Imovelphotos component
import React from 'react';
function ImovelPhotos (){
return (
<div class="col s12 m3 l3">
<div class="card hoverable">
<div class="card-image">
<a href="#">
<img class="responsive-photo " src={require("assets/img/imb/_imagem1-min.jpg")} />
</a>
</div>
</div>
</div>
<div class="col s12 m3 l3">
<div class="card hoverable">
<div class="card-image">
<a href="#">
<img class="responsive-photo" src={require("assets/img/imb/_imagem2-min.jpg")} />
</a>
</div>
</div>
</div>
<div class="col s12 m3 l3">
<div class="card hoverable">
<div class="card-image">
<a href="#">
<img class="responsive-photo " src={require("assets/img/imb/_imagem3-min.jpg")} />
</a>
</div>
</div>
</div>
<div class="col s12 m3 l3">
<div class="card hoverable">
<div class="card-image">
<a href="#">
<img class="responsive-photo " src={require("assets/img/imb/_imagem4-min.jpg")} />
</a>
</div>
</div>
</div>
<div class="col s12 m3 l3">
<div class="card hoverable">
<div class="card-image">
<a href="#">
<img class="responsive-photo " src={require("assets/img/imb/_imagem5-min.jpg")} />
</a>
</div>
</div>
</div>
<div class="col s12 m3 l3">
<div class="card hoverable">
<div class="card-image">
<a href="#">
<img class="responsive-photo" src={require("assets/img/imb/_imagem6-min.jpg")} />
</a>
</div>
</div>
</div>
<div class="col s12 m3 l3">
<div class="card hoverable">
<div class="card-image">
<a href="#">
<img class="responsive-photo " src={require("assets/img/imb/_imagem7-min.jpg")} />
</a>
</div>
</div>
</div>
<div class="col s12 m3 l3">
<div class="card hoverable">
<div class="card-image">
<a href="#">
<img class="responsive-photo " src={require("assets/img/imb/_imagem8-min.jpg")} />
</a>
</div>
</div>
</div>
)
}
export default ImovelPhotos;
I don’t know what version of React you’re using, but you usually only need one parent. That is, put these Ivs within a single to return to the function only one element.
– Sergio
Solved, thank you very much!
– Mike Otharan