Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

🐛 fix: fix type fix

Dillion Verma9b82f2848a23
diff --git a/registry/components/magicui/animated-list.tsx b/registry/components/magicui/animated-list.tsx
index 2bcae50d..75354258 100644
--- a/registry/components/magicui/animated-list.tsx
+++ b/registry/components/magicui/animated-list.tsx
@@ -7,7 +7,7 @@ import {
motion,
useIsPresent,
} from "framer-motion";
-import React, { useEffect, useRef, useState } from "react";
+import React, { ReactElement, useEffect, useRef, useState } from "react";
export function AnimatedList({
className,
@@ -52,7 +52,9 @@ export function AnimatedList({
<div className={cn("flex flex-col items-center gap-4", className)}>
<AnimatePresence>
{items.map((item, index) => (
- <AnimatedListItem key={item.key || index}>{item}</AnimatedListItem>
+ <AnimatedListItem key={(item as ReactElement)?.key || index}>
+ {item}
+ </AnimatedListItem>
))}
</AnimatePresence>
</div>