revert: revert category label handling in plugin card component

pull/12372/head
twwu 2 years ago
parent fa6858090b
commit 2fbc0c2261

@ -11,7 +11,6 @@ import Placeholder from './base/placeholder'
import cn from '@/utils/classnames' import cn from '@/utils/classnames'
import { useGetLanguage } from '@/context/i18n' import { useGetLanguage } from '@/context/i18n'
import { getLanguage } from '@/i18n/language' import { getLanguage } from '@/i18n/language'
import { useCategories } from '../hooks'
export type Props = { export type Props = {
className?: string className?: string
@ -42,7 +41,6 @@ const Card = ({
}: Props) => { }: Props) => {
const defaultLocale = useGetLanguage() const defaultLocale = useGetLanguage()
const locale = localeFromProps ? getLanguage(localeFromProps) : defaultLocale const locale = localeFromProps ? getLanguage(localeFromProps) : defaultLocale
const { categoriesMap } = useCategories()
const { type, name, org, label, brief, icon, verified } = payload const { type, name, org, label, brief, icon, verified } = payload
@ -61,7 +59,7 @@ const Card = ({
return ( return (
<div className={wrapClassName}> <div className={wrapClassName}>
{!hideCornerMark && <CornerMark text={categoriesMap[type].label} />} {!hideCornerMark && <CornerMark text={type} />}
{/* Header */} {/* Header */}
<div className="flex"> <div className="flex">
<Icon src={icon} installed={installed} installFailed={installFailed} /> <Icon src={icon} installed={installed} installFailed={installFailed} />

Loading…
Cancel
Save