import React, { memo } from 'react'; import { IZLConfig } from './schema'; import logo from '@/assets/cardLabel.png'; import styles from './index.less'; interface IProps extends IZLConfig { isTpl?: boolean; } const Coupons = memo((props: IProps) => { const { title, desc, link, frontColor, titColor, round, imgUrl, bgColor, isTpl } = props; const toLink = () => { if (link && window.location.href.indexOf('editor') < 0) { window.location.href = link; } }; return isTpl ? (
) : (
{title && (
{title}
{desc}
)}
); }); export default Coupons;