Hi there I'm getting an SVG from an api in this form:
<svg> ..... </svg>
I'm passing this svg as an props to this MainDisplay Component
class MainDispay extends React.Component {
constructor(props) {
donothing(props);
super(props);
console.log("props", this.props.Collections);
}
async componentDidMount() {}
render() {
return (
<>
{this.props.Collections.map((DataObj, i) => (
<div key={i}>
<div>{DataObj.name}</div>
{this.props.Collections[i].DisplayProps.map((Data, j) => (
<div key={j}>{Data.image_data}</div>
))}
</div>
))}
</>
);
}
}
Only problem is that the Data.image_data
displays <svg>.....<svg>
instead of an image.
Any idea how to display image instead. THANKS in ADVANCE