import React from 'react'; import { useTranslation } from 'react-i18next'; import { ProductType } from './getProducts'; import styles from './Product.module.less'; interface ProductProps { name?: string; icon?: string; slogan?: string; description?: string; url?: string; links: ProductType['links']; style?: React.CSSProperties; language?: string; } const getTarget = (url: string) => url.startsWith('http') && !url.includes('gitee.io') && !url.includes('antv.vision') ? '_blank' : '_self'; const Product: React.FC = ({ name, icon, url = '', slogan, description, links = {}, style, language, }) => { const { t } = useTranslation(); return (
  • {name}

    {name} {slogan}

    {description}
    {links.home && ( {links.home.title ?? t('产品首页')} )} {links.example && ( {links.example.title ?? t('图表示例')} )}
  • ); }; export default Product;