diff --git a/web/app/components/plugins/base/badges/partner.tsx b/web/app/components/plugins/base/badges/partner.tsx index a64fbfb645..8e649c5c0e 100644 --- a/web/app/components/plugins/base/badges/partner.tsx +++ b/web/app/components/plugins/base/badges/partner.tsx @@ -1,5 +1,4 @@ import type { FC } from 'react' -import { useTranslation } from 'react-i18next' import IconWithTooltip from './icon-with-tooltip' import PartnerDark from '@/app/components/base/icons/src/public/plugins/PartnerDark' import PartnerLight from '@/app/components/base/icons/src/public/plugins/PartnerLight' @@ -7,12 +6,13 @@ import useTheme from '@/hooks/use-theme' type PartnerProps = { className?: string + text: string } const Partner: FC = ({ className, + text, }) => { - const { t } = useTranslation() const { theme } = useTheme() return ( @@ -21,7 +21,7 @@ const Partner: FC = ({ theme={theme} BadgeIconLight={PartnerLight} BadgeIconDark={PartnerDark} - popupContent={t('plugin.marketplace.partnerTip')} + popupContent={text} /> ) } diff --git a/web/app/components/plugins/base/badges/verified.tsx b/web/app/components/plugins/base/badges/verified.tsx index 2fd35c5aab..bea45c03ed 100644 --- a/web/app/components/plugins/base/badges/verified.tsx +++ b/web/app/components/plugins/base/badges/verified.tsx @@ -1,5 +1,4 @@ import type { FC } from 'react' -import { useTranslation } from 'react-i18next' import IconWithTooltip from './icon-with-tooltip' import VerifiedDark from '@/app/components/base/icons/src/public/plugins/VerifiedDark' import VerifiedLight from '@/app/components/base/icons/src/public/plugins/VerifiedLight' @@ -7,12 +6,13 @@ import useTheme from '@/hooks/use-theme' type VerifiedProps = { className?: string + text: string } const Verified: FC = ({ className, + text, }) => { - const { t } = useTranslation() const { theme } = useTheme() return ( @@ -21,7 +21,7 @@ const Verified: FC = ({ theme={theme} BadgeIconLight={VerifiedLight} BadgeIconDark={VerifiedDark} - popupContent={t('plugin.marketplace.verifiedTip')} + popupContent={text} /> ) } diff --git a/web/app/components/plugins/card/index.tsx b/web/app/components/plugins/card/index.tsx index e609d849c3..c6fc5731e3 100644 --- a/web/app/components/plugins/card/index.tsx +++ b/web/app/components/plugins/card/index.tsx @@ -73,8 +73,8 @@ const Card = ({
- {isPartner && <Partner className='w-4 h-4 ml-0.5' />} - {verified && <Verified className='w-4 h-4 ml-0.5' />} + {isPartner && <Partner className='w-4 h-4 ml-0.5' text={t('plugin.marketplace.partnerTip')} />} + {verified && <Verified className='w-4 h-4 ml-0.5' text={t('plugin.marketplace.verifiedTip')} />} {titleLeft} {/* This can be version badge */} </div> <OrgInfo