chore: update type definition to resolve lint error in Base usage at text-editor.tsx (#10083)

This commit is contained in:
Kota-Yamaguchi 2024-10-31 10:52:59 +09:00 committed by Joel
parent a0abd5d077
commit dea45682bc

View File

@ -26,7 +26,7 @@ interface Props {
isFocus: boolean
isInNode?: boolean
onGenerated?: (prompt: string) => void
codeLanguages: CodeLanguage
codeLanguages?: CodeLanguage
fileList?: FileEntity[]
showFileList?: boolean
showCodeGenerator?: boolean
@ -78,7 +78,7 @@ const Base: FC<Props> = ({
e.stopPropagation()
}}>
{headerRight}
{showCodeGenerator && (
{showCodeGenerator && codeLanguages && (
<div className='ml-1'>
<CodeGeneratorButton onGenerated={onGenerated} codeLanguages={codeLanguages}/>
</div>