Skip to content

Commit

Permalink
changed div to a ul
Browse files Browse the repository at this point in the history
  • Loading branch information
cameochoquer committed Aug 2, 2023
1 parent bbc02d7 commit 5cfac2b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/components/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ export default function Carousel({ images }: { images: Images }) {

return (
<section className="relative h-96 bg-[#CAC4CE] dark:bg-[#202A37]">
<div id="carousel" className="relative flex justify-center w-screen h-96">
<ul id="carousel" className="relative flex justify-center w-screen h-96">
{images.map((image, i) => (
<Image
key={uuidv4()}
src={image.url}
alt={`image-${i + 1}`}
fill
style={{ objectFit: 'contain' }}
className={currentSlide === i ? '' : 'hidden'}
/>
<li key={uuidv4()} className={currentSlide === i ? '' : 'hidden'}>
<Image
src={image.url}
alt={`image-${i + 1}`}
fill
style={{ objectFit: 'contain' }}
/>
</li>
))}
</div>
</ul>
<button
id="left-arrow"
className="absolute inset-y-0 left-0 h-96 mx-4 rotate-180"
Expand Down

0 comments on commit 5cfac2b

Please sign in to comment.