Change react key to use unique string with index

GitOrigin-RevId: 591cda98d0a34c777cc8a41b2ec64119a1226dfb
This commit is contained in:
M Fahru 2022-10-21 15:35:31 -07:00 committed by Copybot
parent c008a1aece
commit 7e5ccecc7c

View file

@ -24,8 +24,8 @@ export default function SyncMenu() {
<>
<h4>{t('sync')}</h4>
<ul className="list-unstyled nav">
{editorLeftMenuSync.map(({ import: importObject }) => (
<li key={Object.keys(importObject)[0]}>
{editorLeftMenuSync.map(({ import: importObject }, index) => (
<li key={`editor-left-menu-sync-${index}`}>
<ModuleComponent Component={Object.values(importObject)[0]} />
</li>
))}