mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
fix(editor): give the top and bottom breadcrumbs distinct keys (#5463)
The top and bottom breadcrumb bars are keyed separately, so Markdown and HTML tabs no longer log React's duplicate key error.
This commit is contained in:
@@ -507,7 +507,13 @@ function PaneContent({ paneId, tab, tabsVisible }: { paneId: string; tab: Tab; t
|
||||
)}
|
||||
<FindBar paneId={paneId} />
|
||||
{crumbs && (
|
||||
<PaneBreadcrumbs key={wrapper?.id} wrapper={wrapper} path={tab.input.path!} tabId={tab.id} position="top" />
|
||||
<PaneBreadcrumbs
|
||||
key={`top:${wrapper?.id}`}
|
||||
wrapper={wrapper}
|
||||
path={tab.input.path!}
|
||||
tabId={tab.id}
|
||||
position="top"
|
||||
/>
|
||||
)}
|
||||
{wrapper ? (
|
||||
<wrapper.component
|
||||
@@ -523,7 +529,7 @@ function PaneContent({ paneId, tab, tabsVisible }: { paneId: string; tab: Tab; t
|
||||
)}
|
||||
{crumbs && (
|
||||
<PaneBreadcrumbs
|
||||
key={wrapper?.id}
|
||||
key={`bottom:${wrapper?.id}`}
|
||||
wrapper={wrapper}
|
||||
path={tab.input.path!}
|
||||
tabId={tab.id}
|
||||
|
||||
Reference in New Issue
Block a user