fix: marketplace plugin tags i18n
This commit is contained in:
parent
506e5e0bc8
commit
3263a6a5f5
@ -9,6 +9,7 @@ import { useMixedTranslation } from '@/app/components/plugins/marketplace/hooks'
|
|||||||
import InstallFromMarketplace from '@/app/components/plugins/install-plugin/install-from-marketplace'
|
import InstallFromMarketplace from '@/app/components/plugins/install-plugin/install-from-marketplace'
|
||||||
import { useBoolean } from 'ahooks'
|
import { useBoolean } from 'ahooks'
|
||||||
import { useI18N } from '@/context/i18n'
|
import { useI18N } from '@/context/i18n'
|
||||||
|
import { useTags } from '@/app/components/plugins/hooks'
|
||||||
|
|
||||||
type CardWrapperProps = {
|
type CardWrapperProps = {
|
||||||
plugin: Plugin
|
plugin: Plugin
|
||||||
@ -26,6 +27,7 @@ const CardWrapper = ({
|
|||||||
setFalse: hideInstallFromMarketplace,
|
setFalse: hideInstallFromMarketplace,
|
||||||
}] = useBoolean(false)
|
}] = useBoolean(false)
|
||||||
const { locale: localeFromLocale } = useI18N()
|
const { locale: localeFromLocale } = useI18N()
|
||||||
|
const { tagsMap } = useTags(t)
|
||||||
|
|
||||||
if (showInstallButton) {
|
if (showInstallButton) {
|
||||||
return (
|
return (
|
||||||
@ -39,7 +41,7 @@ const CardWrapper = ({
|
|||||||
footer={
|
footer={
|
||||||
<CardMoreInfo
|
<CardMoreInfo
|
||||||
downloadCount={plugin.install_count}
|
downloadCount={plugin.install_count}
|
||||||
tags={plugin.tags.map(tag => tag.name)}
|
tags={plugin.tags.map(tag => tagsMap[tag.name].label)}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -90,7 +92,7 @@ const CardWrapper = ({
|
|||||||
footer={
|
footer={
|
||||||
<CardMoreInfo
|
<CardMoreInfo
|
||||||
downloadCount={plugin.install_count}
|
downloadCount={plugin.install_count}
|
||||||
tags={plugin.tags.map(tag => tag.name)}
|
tags={plugin.tags.map(tag => tagsMap[tag.name].label)}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user