fix: repeated element key
This commit is contained in:
parent
cfe73281a0
commit
4b20bf7556
|
|
@ -50,9 +50,9 @@ function Container({
|
|||
<div role="status" className={cn("animate-pulse", className)}>
|
||||
{Array.from(new Array(count)).map((_, index) => (
|
||||
<React.Fragment key={index}>
|
||||
{childrenArray.map((child) =>
|
||||
{childrenArray.map((child, i) =>
|
||||
React.cloneElement(child as React.ReactElement<any>, {
|
||||
key: index,
|
||||
key: `child-${index}-${i}`,
|
||||
}),
|
||||
)}
|
||||
</React.Fragment>
|
||||
|
|
|
|||
Loading…
Reference in New Issue