feat: auto disable document ui
parent
ae3eae413f
commit
335e57f3c9
@ -0,0 +1,29 @@
|
|||||||
|
'use client'
|
||||||
|
import type { FC } from 'react'
|
||||||
|
import React from 'react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import StatusWithAction from './status-with-action'
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
datasetId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const AutoDisabledDocument: FC<Props> = ({
|
||||||
|
datasetId,
|
||||||
|
}) => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
const data = ['', '']
|
||||||
|
const hasDisabledDocument = data.length > 0
|
||||||
|
if (!hasDisabledDocument)
|
||||||
|
return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<StatusWithAction
|
||||||
|
type='info'
|
||||||
|
description={t('dataset.documentsDisabled', { num: data.length })}
|
||||||
|
actionText={t('dataset.enable')}
|
||||||
|
onAction={() => { }}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default React.memo(AutoDisabledDocument)
|
||||||
Loading…
Reference in New Issue