'use client' import type { FC } from 'react' import { useTranslation } from 'react-i18next' import { ImageIndentLeft } from '@/app/components/base/icons/src/vender/line/editor' import { Markdown } from '@/app/components/base/markdown' import LoadingAnim from '@/app/components/app/chat/loading-anim' type ResultTextProps = { isRunning?: boolean outputs?: any error?: string onClick?: () => void } const ResultText: FC = ({ isRunning, outputs, error, onClick, }) => { const { t } = useTranslation() return (
{isRunning && !outputs && (
)} {!isRunning && error && (
{error}
)} {!isRunning && !outputs && !error && (
{t('runLog.resultEmpty.title')}
{t('runLog.resultEmpty.tipLeft')} {t('runLog.resultEmpty.link')} {t('runLog.resultEmpty.tipRight')}
)} {outputs && (
)}
) } export default ResultText