fix: install plugin type show error
This commit is contained in:
parent
becdca24df
commit
44b0039e8b
@ -44,7 +44,7 @@ const Card = ({
|
||||
const locale = localeFromProps ? getLanguage(localeFromProps) : defaultLocale
|
||||
const { categoriesMap } = useCategories()
|
||||
const { type, category, name, org, label, brief, icon, verified } = payload
|
||||
const cornerMark = type !== 'plugin' ? categoriesMap.bundle?.label : categoriesMap[category]?.label
|
||||
const cornerMark = !['plugin', 'model', 'tool', 'extension'].includes(type) ? categoriesMap.bundle?.label : categoriesMap[category]?.label
|
||||
const getLocalizedText = (obj: Record<string, string> | undefined) =>
|
||||
obj?.[locale] || obj?.['en-US'] || obj?.en_US || ''
|
||||
|
||||
|
@ -45,6 +45,7 @@ const Installed: FC<Props> = ({
|
||||
useEffect(() => {
|
||||
if (hasInstalled && uniqueIdentifier === installedInfoPayload.uniqueIdentifier)
|
||||
onInstalled()
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [hasInstalled])
|
||||
|
||||
const [isInstalling, setIsInstalling] = React.useState(false)
|
||||
|
@ -107,7 +107,7 @@ export type PluginDetail = {
|
||||
}
|
||||
|
||||
export type Plugin = {
|
||||
type: 'plugin' | 'bundle'
|
||||
type: 'plugin' | 'bundle' | 'model' | 'extension' | 'tool'
|
||||
org: string
|
||||
author?: string
|
||||
name: string
|
||||
|
Loading…
Reference in New Issue
Block a user