mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-10 06:00:19 +00:00
Fix missing key for React.Fragment in Array map listing
This commit is contained in:
parent
7fa066116f
commit
e799197cfa
@ -23,6 +23,7 @@ import { isMobile } from '~/utils/mobile';
|
|||||||
import { FileBreadcrumb } from './FileBreadcrumb';
|
import { FileBreadcrumb } from './FileBreadcrumb';
|
||||||
import { FileTree } from './FileTree';
|
import { FileTree } from './FileTree';
|
||||||
import { Terminal, type TerminalRef } from './terminal/Terminal';
|
import { Terminal, type TerminalRef } from './terminal/Terminal';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface EditorPanelProps {
|
interface EditorPanelProps {
|
||||||
files?: FileMap;
|
files?: FileMap;
|
||||||
@ -203,7 +204,7 @@ export const EditorPanel = memo(
|
|||||||
const isActive = activeTerminal === index;
|
const isActive = activeTerminal === index;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={index}>
|
||||||
{index == 0 ? (
|
{index == 0 ? (
|
||||||
<button
|
<button
|
||||||
key={index}
|
key={index}
|
||||||
@ -222,7 +223,7 @@ export const EditorPanel = memo(
|
|||||||
Bolt Terminal
|
Bolt Terminal
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<React.Fragment>
|
||||||
<button
|
<button
|
||||||
key={index}
|
key={index}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
@ -238,9 +239,9 @@ export const EditorPanel = memo(
|
|||||||
<div className="i-ph:terminal-window-duotone text-lg" />
|
<div className="i-ph:terminal-window-duotone text-lg" />
|
||||||
Terminal {terminalCount > 1 && index}
|
Terminal {terminalCount > 1 && index}
|
||||||
</button>
|
</button>
|
||||||
</>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
</>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{terminalCount < MAX_TERMINALS && <IconButton icon="i-ph:plus" size="md" onClick={addTerminal} />}
|
{terminalCount < MAX_TERMINALS && <IconButton icon="i-ph:plus" size="md" onClick={addTerminal} />}
|
||||||
|
Loading…
Reference in New Issue
Block a user