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 GitHub
parent 0bdae34b5e
commit 6c25131964
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,7 @@ type 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>