import debounceRender from 'react-debounce-render'
import BadgenTitle from './badgen-title'
const BadgePreview = ({ host, badgeURL, focus }) => {
const showPreview = focus || !!badgeURL
return (
)
}
const PreviewBadge = debounceRender(({ host, url }) => {
return
}, 300)
const genBadgeSrc = (host, url) => {
if (!url) {
return host + 'badge/%20/%20'
}
if (url.split('/').length > 2) {
return host + url
} else {
return host + 'badge/%20/%20'
}
}
export default BadgePreview