Skip to content

Commit

Permalink
Fix carousel problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluesmile82 committed Oct 21, 2024
1 parent 2d79eef commit 6afe705
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/components/vertical-carousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ const VerticalCarousel = ({ children, className }:
opacity: 1,
transition: { ease: "linear", duration: 0.5 },
},
exit: {
opacity: 0,
y: "-100%",
transition: { ease: "linear", duration: 0.5 },
},
};

useEffect(() => {
Expand All @@ -40,7 +35,7 @@ const VerticalCarousel = ({ children, className }:
<AnimatePresence initial={false}>
{content.map((child, i) => (
i === index && (
<motion.div key={i} className="absolute w-full"
<motion.div key={`carousel-item-${i}`} className="absolute w-full"
variants={contentAnimation}
initial="initial"
animate="animate"
Expand Down

0 comments on commit 6afe705

Please sign in to comment.