So, I have this component in React called HomepageServices, the images in it show up when it's rendered from the Homepage Component like this.
Image shows up like in this picture
But when it's rendered from another component, images don't show up. images don't show up
Here's the code for the HomepageServices component.
import React from "react";
import "./_homepageServices.scss";
const HomepageServices = () => {
return (
<section className="homepage-services">
<div className="homepage-services__elements row">
<div className="service-img">
<img src="img/home/home-icon-1.png" alt="home" />
</div>
<div className="service-text">
<h3 className="service-header">
On Time
<br />
Service.
</h3>
<p className="service-body">
Transforming distribution and marketing with key capabilities in
customer insight and analytics.
</p>
</div>
<div className="service-img">
<img src="img/home/home-icon-2.png" alt="clock" />
</div>
<div className="service-text">
<h3 className="service-header">
A Team Of <br /> Professionals.
</h3>
<p className="service-body">
Transforming distribution and marketing with key capabilities in
customer insight and analytics.
</p>
</div>
<div className="service-img">
<img src="img/home/home-icon-3.png" alt="clock" />
</div>
<div className="service-text">
<h3 className="service-header">
Analyze Your <br /> Business.
</h3>
<p className="service-body">
Transforming distribution and marketing with key capabilities in
customer insight and analytics.
</p>
</div>
</div>
</section>
);
};
export default HomepageServices;
And here is the code for the component from which i'm trying to render HomepageServices.(Just the jsx, the entire component is quite large.
return (
<section className="single-service">
<Sidebar setContents={setContents} contents={contents} body={content} />
<div className="single-service__body">
<h1 className="single-service__body__header">{content?.name}</h1>
<span className="single-service__body__subheader">
{content?.header}
</span>
<div
dangerouslySetInnerHTML={createMarkup(content?.body)}
className="single-service__body__content"
></div>
<div className="single-service__body__li">
<li>
<i class="fa fa-check-square"></i> Lorem ipsum dolor sit
amet, consectetuer adipiscing elit.
</li>
<li>
<i class="fa fa-check-square"></i> Lorem ipsum dolor sit
amet, consectetuer adipiscing elit.
</li>
<li>
<i class="fa fa-check-square"></i> Lorem ipsum dolor sit
amet, consectetuer adipiscing elit.
</li>
<li>
<i class="fa fa-check-square"></i> Lorem ipsum dolor sit
amet, consectetuer adipiscing elit.
</li>
<li>
<i class="fa fa-check-square"></i> Lorem ipsum dolor sit
amet, consectetuer adipiscing elit.
</li>
</div>
<HomepageServices />
</div>
</section>
);