Commit d72fcb66 authored by JzoNg's avatar JzoNg

fix: loading of preview in Q&A model

parent 1610f599
...@@ -165,10 +165,11 @@ const StepTwo = ({ ...@@ -165,10 +165,11 @@ const StepTwo = ({
setAutomaticFileIndexingEstimate(res) setAutomaticFileIndexingEstimate(res)
} }
const confirmChangeCustomConfig = async () => { const confirmChangeCustomConfig = () => {
setCustomFileIndexingEstimate(null) setCustomFileIndexingEstimate(null)
setShowPreview() setShowPreview()
await fetchFileIndexingEstimate() fetchFileIndexingEstimate()
setPreviewSwitched(false)
} }
const getIndexing_technique = () => indexingType || indexType const getIndexing_technique = () => indexingType || indexType
...@@ -698,7 +699,12 @@ const StepTwo = ({ ...@@ -698,7 +699,12 @@ const StepTwo = ({
))} ))}
</> </>
)} )}
{!fileIndexingEstimate?.preview && !fileIndexingEstimate?.qa_preview && ( {previewSwitched && docForm === DocForm.QA && !fileIndexingEstimate?.qa_preview && (
<div className='flex items-center justify-center h-[200px]'>
<Loading type='area' />
</div>
)}
{!previewSwitched && !fileIndexingEstimate?.preview && (
<div className='flex items-center justify-center h-[200px]'> <div className='flex items-center justify-center h-[200px]'>
<Loading type='area' /> <Loading type='area' />
</div> </div>
......
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