JohnnyGoodrich / John-and-Emmas-project-2

0 stars 0 forks source link

Glows #24

Open JohnnyGoodrich opened 1 year ago

JohnnyGoodrich commented 1 year ago

Carousel Function:

    const eachDrink = drinks.drinks.map((drink, imageIndex) => 
    <Carousel.Item key={imageIndex}>
    <img key={imageIndex}
      className="d-block w-100"
      src={drinks.drinks[imageIndex].strDrinkThumb}
      alt="drink"/>
      <Carousel.Caption>
      <h3 key={imageIndex}>{drinks.drinks[imageIndex].strDrink}</h3>
      <p key={imageIndex}>{drinks.drinks[imageIndex].strIngredient1}</p>
    </Carousel.Caption>
    </Carousel.Item>
    )
    return (
        <Carousel activeIndex={index} onSelect={handleSelect}>
            {eachDrink}
        </Carousel>
    );
}

Proud of this one because it involved collaboration between both teammates and took a lot of time to figure out/get it to work but it turned out great

maker-jws commented 1 year ago

@JohnnyGoodrich @emblaido This is great work, and it is good to see teamwork to get the carousel to update in react.

Some areas for improvement: