mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 05:25:44 +01:00
fix annoying react error "missing unique key prop"
This commit is contained in:
committed by
René Pfeuffer
parent
2087c27671
commit
6343eddeb3
@@ -52,7 +52,13 @@ const SplitAndReplace: FC<Props> = ({ text, replacements }) => {
|
||||
if (parts.length === 0) {
|
||||
return <>{parts[0]}</>;
|
||||
}
|
||||
return <>{parts}</>;
|
||||
return (
|
||||
<>
|
||||
{parts.map((part, index) => (
|
||||
<React.Fragment key={index}>{part}</React.Fragment>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default SplitAndReplace;
|
||||
|
||||
Reference in New Issue
Block a user