Probably a simple question. I just need the Bootstrap Carousel to populate data for each item in newMovies[]. In this case, there will always be 5 items total. Obviously what I have below is wrong, but I’ve tried a few different similar things and can’t figure it out. What is pasted below will only show data for the last item in the array.
<div className='container'>
<img className='glowSign' src={glowSign} alt='New Releases'></img>
<div id="carouselExampleIndicators" className="carousel slide" data-bs-interval="false" data-bs-ride="carousel">
<ol className="carousel-indicators">
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" className="active"></li>
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1"></li>
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2"></li>
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="3"></li>
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="4"></li>
</ol>
<div className="carousel-inner">
{newMovies.map((movie) => {
return(
<div className="carousel-item active" key={movie._id}>
<img className="d-block w-100" src={comedyGenre} alt="First slide" />
<div className="carousel-caption d-md-block">
<h5>{movie.title}</h5>
<p>{movie.runtime}</p>
</div>
</div>
)
})}
</div>
<button className="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
<span className="carousel-control-prev-icon" aria-hidden="true"></span>
</button>
<button className="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
<span className="carousel-control-next-icon" aria-hidden="true"></span>
</button>
</div>
</div>