Code:
funcOne = props => {
let {
time,
minTechnics,
isNProcessOffer,
isNSampleOffer,
processTadeAttributes,
unit,
} = props;
if (isNProcessOffer) {
let { sampleTime, reserveRange, minReserveAmount } = processTadeAttributes;
if (isNSampleOffer) {
return (<div className="time clearfix"><div className="printNum"></div> <div className="time">{sampleTime}</div></div>);
}
let result = reserveRange.filter(item => item.beginAmount === minReserveAmount);
return (<div className="time clearfix"><div className="printNum">:{minReserveAmount}{unit}</div> <div className="time">:{result[0].date} </div></div>);
}
return (<div className="time clearfix"><div className="printNum">:{minTechnics}{unit}</div> <div className="time">:{time} </div></div>);
};
render(){
return (
<div>
{
this.props.data.map((v,index)=>{
return (
<div>
{
this.funcOne(v)
}
</div>
)
})
}
</div>
)
}
console error message:
Uncaught Error: Objects are not valid as a React child (found: object with keys {default, spot_qt_sy}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment (object) from the React