Commit ece04385 authored by Joel's avatar Joel

Merge branch 'feat/support-download-res' into deploy/dev

parents 5b8b5409 676e7360
...@@ -107,7 +107,7 @@ const TextGeneration: FC<IMainProps> = ({ ...@@ -107,7 +107,7 @@ const TextGeneration: FC<IMainProps> = ({
const allTaskFinished = allTaskList.every(task => task.status === TaskStatus.completed) const allTaskFinished = allTaskList.every(task => task.status === TaskStatus.completed)
const [batchCompletionRes, setBatchCompletionRes, getBatchCompletionRes] = useGetState<Record<string, string>>({}) const [batchCompletionRes, setBatchCompletionRes, getBatchCompletionRes] = useGetState<Record<string, string>>({})
const exportRes = allTaskList.map((task) => { const exportRes = allTaskList.map((task) => {
if (!allTaskFinished || allTaskList.length === 0) if (allTaskList.length > 0 && !allTaskFinished)
return {} return {}
const batchCompletionResLatest = getBatchCompletionRes() const batchCompletionResLatest = getBatchCompletionRes()
const res: Record<string, string> = {} const res: Record<string, string> = {}
...@@ -364,7 +364,7 @@ const TextGeneration: FC<IMainProps> = ({ ...@@ -364,7 +364,7 @@ const TextGeneration: FC<IMainProps> = ({
<div className='text-lg text-gray-800 font-semibold'>{t('share.generation.title')}</div> <div className='text-lg text-gray-800 font-semibold'>{t('share.generation.title')}</div>
</div> </div>
<div className='flex items-center space-x-2'> <div className='flex items-center space-x-2'>
{allTaskFinished && ( {allTaskList.length > 0 && allTaskFinished && (
<ResDownload <ResDownload
isMobile={isMobile} isMobile={isMobile}
values={exportRes} values={exportRes}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment