chore: install plugin by local use use query

This commit is contained in:
Joel
2024-11-11 13:00:41 +08:00
parent 822c18cb76
commit f47b5ce63a
3 changed files with 13 additions and 7 deletions

View File

@ -8,7 +8,7 @@ import Button from '@/app/components/base/button'
import { Trans, useTranslation } from 'react-i18next'
import { RiLoader2Line } from '@remixicon/react'
import Badge, { BadgeState } from '@/app/components/base/badge/index'
import { installPackageFromLocal } from '@/service/plugins'
import { useInstallPackageFromLocal } from '@/service/use-plugins'
import checkTaskStatus from '../../base/check-task-status'
import { usePluginTasksStore } from '@/app/components/plugins/plugin-page/store'
@ -33,6 +33,8 @@ const Installed: FC<Props> = ({
}) => {
const { t } = useTranslation()
const [isInstalling, setIsInstalling] = React.useState(false)
const { mutateAsync: installPackageFromLocal } = useInstallPackageFromLocal()
const {
check,
stop,