Skip to content

Commit 0c425f7

Browse files
committed
Fix key orders in React
1 parent 4828339 commit 0c425f7

File tree

2 files changed

+2
-2
lines changed
  • packages/app/src

2 files changed

+2
-2
lines changed

packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const DevToolTabs = ({
8080
pane.closeable && panes.length !== 1 ? closeTab : undefined
8181
}
8282
index={i}
83-
key={pane.id}
83+
key={i} // eslint-disable-line react/no-array-index-key pane.id is not unique!
8484
status={
8585
status
8686
? status[pane.id] || { unread: 0, type: 'info' }

packages/app/src/embed/components/Content/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ export default class Content extends React.PureComponent<Props, State> {
540540
>
541541
{views.map((devView, i) => (
542542
<DevTools
543-
key={sandbox.id}
543+
key={i} // eslint-disable-line react/no-array-index-key
544544
devToolIndex={i}
545545
addedViews={{
546546
'codesandbox.browser': browserConfig,

0 commit comments

Comments
 (0)