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:
l0ng-ai
2026-11-23 19:38:19 +08:00
committed by GitHub
parent 546ff9f314
commit a21de32077
+8 -2
View File
@@ -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}