mirror of
https://github.com/johndoe6345789/docker-swarm-termina.git
synced 2026-04-24 13:45:01 +00:00
Move all TypeScript interfaces from component files to /lib/interfaces folder Move terminal utility functions to /lib/utils folder Update all component imports to use centralized interfaces and utilities Fix JSX.Element type to React.ReactElement in terminal utils This improves code organization and reduces duplication across components https://claude.ai/code/session_G4kZm
38 lines
826 B
TypeScript
38 lines
826 B
TypeScript
import React from 'react';
|
|
import { SimpleTerminalProps } from '@/lib/interfaces/terminal';
|
|
import TerminalOutput from './TerminalOutput';
|
|
import CommandInput from './CommandInput';
|
|
|
|
export default function SimpleTerminal({
|
|
output,
|
|
command,
|
|
workdir,
|
|
isExecuting,
|
|
isMobile,
|
|
containerName,
|
|
outputRef,
|
|
onCommandChange,
|
|
onExecute,
|
|
onKeyPress,
|
|
}: SimpleTerminalProps) {
|
|
return (
|
|
<>
|
|
<TerminalOutput
|
|
output={output}
|
|
containerName={containerName}
|
|
outputRef={outputRef}
|
|
/>
|
|
<CommandInput
|
|
command={command}
|
|
workdir={workdir}
|
|
isExecuting={isExecuting}
|
|
isMobile={isMobile}
|
|
containerName={containerName}
|
|
onCommandChange={onCommandChange}
|
|
onExecute={onExecute}
|
|
onKeyPress={onKeyPress}
|
|
/>
|
|
</>
|
|
);
|
|
}
|