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