mirror of https://github.com/langgenius/dify.git
chore: remove isloading break ui
This commit is contained in:
parent
d1743ee3e5
commit
430de3108b
|
|
@ -34,7 +34,7 @@ const indexStateReducer = (state: IIndexState, action: IAction) => {
|
|||
const RetryButton: FC<Props> = ({ datasetId }) => {
|
||||
const { t } = useTranslation()
|
||||
const [indexState, dispatch] = useReducer(indexStateReducer, { value: 'success' })
|
||||
const { data: errorDocs } = useSWR({ datasetId }, getErrorDocs)
|
||||
const { data: errorDocs, isLoading } = useSWR({ datasetId }, getErrorDocs)
|
||||
|
||||
const onRetryErrorDocs = async () => {
|
||||
dispatch({ type: 'retry' })
|
||||
|
|
@ -53,7 +53,7 @@ const RetryButton: FC<Props> = ({ datasetId }) => {
|
|||
dispatch({ type: 'error' })
|
||||
}, [errorDocs?.total])
|
||||
|
||||
if (indexState.value === 'success')
|
||||
if (isLoading || indexState.value === 'success')
|
||||
return null
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in New Issue