fix: handle install the same version
This commit is contained in:
parent
f40b212b04
commit
fba468e8ad
@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
import type { FC } from 'react'
|
||||
import React, { useMemo } from 'react'
|
||||
import React, { useEffect, useMemo } from 'react'
|
||||
// import { RiInformation2Line } from '@remixicon/react'
|
||||
import type { Plugin, PluginManifestInMarket } from '../../../types'
|
||||
import Card from '../../../card'
|
||||
@ -51,6 +51,11 @@ const Installed: FC<Props> = ({
|
||||
stop,
|
||||
} = checkTaskStatus()
|
||||
|
||||
useEffect(() => {
|
||||
if (hasInstalled && toInstallVersion === installedVersion)
|
||||
onInstalled()
|
||||
}, [hasInstalled, toInstallVersion, installedVersion])
|
||||
|
||||
const handleCancel = () => {
|
||||
stop()
|
||||
onCancel()
|
||||
@ -107,7 +112,7 @@ const Installed: FC<Props> = ({
|
||||
return (<>{
|
||||
!installedVersion
|
||||
? (
|
||||
<Badge className='mx-1' size="s" state={BadgeState.Default}>{ }</Badge>
|
||||
<Badge className='mx-1' size="s" state={BadgeState.Default}>{toInstallVersion}</Badge>
|
||||
)
|
||||
: (
|
||||
<>
|
||||
|
Loading…
Reference in New Issue
Block a user