Chore/cleanup warnings (#17974)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import React from 'react'
|
||||
|
||||
type Props = {}
|
||||
|
||||
const index = (props: Props) => {
|
||||
const index = () => {
|
||||
return (
|
||||
<div>index</div>
|
||||
)
|
||||
|
@@ -184,7 +184,7 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
|
||||
await sleep(2500)
|
||||
await startQueryStatus()
|
||||
}
|
||||
catch (e) {
|
||||
catch {
|
||||
await sleep(2500)
|
||||
await startQueryStatus()
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ const EmptyDatasetCreationModal = ({
|
||||
onHide()
|
||||
router.push(`/datasets/${dataset.id}/documents`)
|
||||
}
|
||||
catch (err) {
|
||||
catch {
|
||||
notify({ type: 'error', message: t('datasetCreation.stepOne.modal.failed') })
|
||||
}
|
||||
}
|
||||
|
@@ -130,7 +130,7 @@ const JinaReader: FC<Props> = ({
|
||||
},
|
||||
}
|
||||
}
|
||||
}, [crawlOptions.limit])
|
||||
}, [crawlOptions.limit, onCheckedCrawlResultChange])
|
||||
|
||||
const handleRun = useCallback(async (url: string) => {
|
||||
const { isValid, errorMsg } = checkValid(url)
|
||||
@@ -186,7 +186,7 @@ const JinaReader: FC<Props> = ({
|
||||
finally {
|
||||
setStep(Step.finished)
|
||||
}
|
||||
}, [checkValid, crawlOptions, onJobIdChange, t, waitForCrawlFinished])
|
||||
}, [checkValid, crawlOptions, onCheckedCrawlResultChange, onJobIdChange, t, waitForCrawlFinished])
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
@@ -193,7 +193,7 @@ const EmbeddingDetail: FC<IEmbeddingDetailProps> = ({
|
||||
await sleep(2500)
|
||||
await startQueryStatus()
|
||||
}
|
||||
catch (e) {
|
||||
catch {
|
||||
await sleep(2500)
|
||||
await startQueryStatus()
|
||||
}
|
||||
|
@@ -135,7 +135,7 @@ const DocumentDetail: FC<Props> = ({ datasetId, documentId }) => {
|
||||
params: { metadata: 'without' },
|
||||
})
|
||||
|
||||
const { data: documentMetadata, error: metadataErr, refetch: metadataMutate } = useDocumentMetadata({
|
||||
const { data: documentMetadata } = useDocumentMetadata({
|
||||
datasetId,
|
||||
documentId,
|
||||
params: { metadata: 'only' },
|
||||
@@ -146,7 +146,6 @@ const DocumentDetail: FC<Props> = ({ datasetId, documentId }) => {
|
||||
}
|
||||
|
||||
const isDetailLoading = !documentDetail && !error
|
||||
const isMetadataLoading = !documentMetadata && !metadataErr
|
||||
|
||||
const embedding = ['queuing', 'indexing', 'paused'].includes((documentDetail?.display_status || '').toLowerCase())
|
||||
|
||||
|
@@ -14,7 +14,7 @@ const ChildChunks: FC<Props> = ({
|
||||
payload,
|
||||
isShowAll,
|
||||
}) => {
|
||||
const { id, score, content, position } = payload
|
||||
const { score, content, position } = payload
|
||||
return (
|
||||
<div
|
||||
className={!isShowAll ? 'line-clamp-2 break-all' : ''}
|
||||
|
@@ -55,7 +55,7 @@ const RenameDatasetModal = ({ show, dataset, onSuccess, onClose }: RenameDataset
|
||||
onSuccess()
|
||||
onClose()
|
||||
}
|
||||
catch (e) {
|
||||
catch {
|
||||
notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') })
|
||||
}
|
||||
finally {
|
||||
|
@@ -160,7 +160,7 @@ const Form = () => {
|
||||
mutate(unstable_serialize(getKey))
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
catch {
|
||||
notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') })
|
||||
}
|
||||
finally {
|
||||
|
Reference in New Issue
Block a user