fix: not handleinstall error

This commit is contained in:
Joel
2024-11-29 15:09:23 +08:00
parent 35ef874867
commit 84cad5969e
2 changed files with 26 additions and 15 deletions

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useEffect } from 'react'
import type { PluginDeclaration } from '../../../types'
import { type PluginDeclaration, TaskStatus } from '../../../types'
import Card from '../../../card'
import { pluginManifestToCardPluginProps } from '../../utils'
import Button from '@/app/components/base/button'
@ -95,10 +95,14 @@ const Installed: FC<Props> = ({
return
}
handleRefetch()
await check({
const { status, error } = await check({
taskId,
pluginUniqueIdentifier: uniqueIdentifier,
})
if (status === TaskStatus.failed) {
onFailed(error)
return
}
onInstalled()
}
catch (e) {