@@ -95,7 +95,7 @@ const CodeEditor: React.FC<CodeEditorProps> = ({
9595 onFileRename,
9696 onShare,
9797 activeFileProp,
98- showConsole = true ,
98+ showConsole = false , // Default to false to avoid double console
9999 onRunClick
100100} ) => {
101101 const { t } = useLanguage ( ) ;
@@ -369,21 +369,7 @@ const CodeEditor: React.FC<CodeEditorProps> = ({
369369 < span > { activeFile || 'Empty' } </ span >
370370 </ div >
371371 </ div >
372- < div className = "flex items-center gap-2" >
373- { onShare && (
374- < button onClick = { onShare } className = "flex items-center gap-2 px-3 py-1.5 text-xs font-medium text-gray-300 bg-white/5 hover:bg-white/10 hover:text-white transition-colors rounded border border-white/10" >
375- < Share2 size = { 14 } /> { t ( 'editor.share' ) }
376- </ button >
377- ) }
378- < button
379- onClick = { ( ) => onRunClick ? onRunClick ( ) : handleRun ( ) }
380- disabled = { isRunning && ! onRunClick }
381- className = { `flex items-center gap-2 px-4 py-1.5 bg-gradient-to-r from-green-600 to-green-500 hover:from-green-500 hover:to-green-400 text-white text-xs font-bold uppercase tracking-wider rounded shadow-lg transition-all ${ ( isRunning && ! onRunClick ) ? 'opacity-70' : '' } ` }
382- >
383- < Play size = { 12 } fill = "currentColor" />
384- { ( isRunning && ! onRunClick ) ? t ( 'editor.running' ) : t ( 'editor.run' ) }
385- </ button >
386- </ div >
372+ { /* Removed Duplicate Run Button and Share Button from here, now handled by Playground.tsx */ }
387373 </ div >
388374
389375 < div className = "flex flex-1 overflow-hidden" >
@@ -451,7 +437,7 @@ const CodeEditor: React.FC<CodeEditorProps> = ({
451437 ) }
452438 </ div >
453439
454- { /* Terminal / Console */ }
440+ { /* Terminal / Console - Render only if showConsole is true */ }
455441 { showConsole && (
456442 < div className = "h-1/3 border-t border-origami-border bg-[#0A0A0C] flex flex-col" >
457443 < div className = "px-4 py-2 border-b border-gray-800/50 flex items-center gap-2" >
0 commit comments