message: fix: fixed same key for multiple children error due to stack flattening
diff: @@ -17,15 +17,29 @@ type SpaceType =
  // Thanks @gregberge for code and @nandorojo for suggestion.
  // Original source: https://github.com/gregberge/react-flatten-children
  type ReactChildArray = ReturnType<typeof React.Children.toArray>;
  -function flattenChildren(children: React.ReactNode): ReactChildArray {
  +function flattenChildren(
  + children: React.ReactNode,
  + keys: (string | number)[] = []
  +): ReactChildArray {
  const childrenArray = React.Children.toArray(children);
  - return childrenArray.reduce((flatChildren: ReactChildArray, child) => {
  + return childrenArray.reduce((flatChildren: ReactChildArray, child, index: number) => {
  if ((child as React.ReactElement<any>).type === React.Fragment) {
  return flatChildren.concat(
  - flattenChildren((child as React.ReactElement<any>).props.children)
  + flattenChildren(
  + (child as React.ReactElement<any>).props.children,
  + keys.concat(child.key || index)
  + )
  );
  }
  + if (React.isValidElement(child)) {
  + flatChildren.push(
  + React.cloneElement(child, {
  + key: keys.concat(String(child.key || index)).join('.')
  + })
  + );
  + } else {
  flatChildren.push(child);
  + }
  return flatChildren;
  }, []);
  }
  