diff --git a/web/app/components/datasets/documents/create-from-pipeline/hooks.ts b/web/app/components/datasets/documents/create-from-pipeline/hooks.ts index 15f30ed726..bc1db702f9 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/hooks.ts +++ b/web/app/components/datasets/documents/create-from-pipeline/hooks.ts @@ -149,7 +149,6 @@ export const useOnlineDocuments = () => { export const useWebsiteCrawl = () => { const [websitePages, setWebsitePages] = useState([]) - const [websiteCrawlJobId, setWebsiteCrawlJobId] = useState('') const [currentWebsite, setCurrentWebsite] = useState() const previewWebsitePage = useRef(websitePages[0]) @@ -169,10 +168,8 @@ export const useWebsiteCrawl = () => { return { websitePages, - websiteCrawlJobId, previewWebsitePage, updataCheckedCrawlResultChange, - setWebsiteCrawlJobId, currentWebsite, updateCurrentWebsite, hideWebsitePreview, diff --git a/web/app/components/datasets/documents/create-from-pipeline/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/index.tsx index 7e4d2988fa..ea1effca45 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/index.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/index.tsx @@ -72,10 +72,8 @@ const CreateFormPipeline = () => { } = useOnlineDocuments() const { websitePages, - // websiteCrawlJobId, // todo: Add status query previewWebsitePage, updataCheckedCrawlResultChange, - setWebsiteCrawlJobId, currentWebsite, updateCurrentWebsite, hideWebsitePreview, @@ -279,7 +277,6 @@ const CreateFormPipeline = () => { }} checkedCrawlResult={websitePages} onCheckedCrawlResultChange={updataCheckedCrawlResultChange} - onJobIdChange={setWebsiteCrawlJobId} onPreview={updateCurrentWebsite} /> )} @@ -328,21 +325,19 @@ const CreateFormPipeline = () => { { currentStep === 2 && (
- {estimateData && ( - file.file)} - onlineDocuments={onlineDocuments} - websitePages={websitePages} - isIdle={isIdle && isPreview.current} - isPending={isPending && isPreview.current} - estimateData={estimateData} - onPreview={onClickPreview} - handlePreviewFileChange={handlePreviewFileChange} - handlePreviewOnlineDocumentChange={handlePreviewOnlineDocumentChange} - handlePreviewWebsitePageChange={handlePreviewWebsiteChange} - /> - )} + file.file)} + onlineDocuments={onlineDocuments} + websitePages={websitePages} + isIdle={isIdle} + isPending={isPending} + estimateData={estimateData} + onPreview={onClickPreview} + handlePreviewFileChange={handlePreviewFileChange} + handlePreviewOnlineDocumentChange={handlePreviewOnlineDocumentChange} + handlePreviewWebsitePageChange={handlePreviewWebsiteChange} + />
) } diff --git a/web/app/components/datasets/documents/create-from-pipeline/preview/file-preview.tsx b/web/app/components/datasets/documents/create-from-pipeline/preview/file-preview.tsx index 30d3e4f9c1..24e2ad58be 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/preview/file-preview.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/preview/file-preview.tsx @@ -40,7 +40,7 @@ const FilePreview = ({ } return ( -
+
{t('datasetPipeline.addDocuments.stepOne.preview')}
diff --git a/web/app/components/datasets/documents/create-from-pipeline/preview/loading.tsx b/web/app/components/datasets/documents/create-from-pipeline/preview/loading.tsx index c15fec6c40..92478adc71 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/preview/loading.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/preview/loading.tsx @@ -3,7 +3,7 @@ import { SkeletonContainer, SkeletonRectangle } from '@/app/components/base/skel const Loading = () => { return ( -
+