This is the code that I am currently using: The script is placed within the navbar and on the home page. The navbar script displays all the time, but the script on the home page does not load when navigating from one page to another.
import '../App.css';
import './hero.css'
import Hero_Img1 from '../images/blob-haikei (2).png'
function HeroSection() {
return (
<div className='hero-container'>
<div className="hero_img_container">
<img src={Hero_Img1} className="hero_img_left" alt="Hero img"/>
</div>
<h1>The White Dental</h1>
<p>We Care For You</p>
<script type='text/javascript' src='https://www.lybrate.com/***/****/****/em-wt.js'></script>
<div className='lybrate-widget' name='dr-sandeep-kumar-jangra-dentist' tabs='ba,cp' btn-text=' Book Appointment '></div>
</div>
);
}
export default HeroSection;