Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
let props = this.props,
name = props.name,
loaded = Iconify.iconExists(name),
deleteButton = null;
// Delete button
if (props.view.type === 'custom' && props.view.canDelete) {
deleteButton = (
<a title="{lang.delete}" href="#">
</a>
);
}
render() {
let props = this.props,
name = props.name,
icon = props.icon,
loaded = Iconify.iconExists(name);
// Generate link and tooltip
let link = props.config.links.icon
.replace('{prefix}', icon.prefix)
.replace('{name}', icon.name);
if (!loaded) {
return (
);
render() {
let app = this.props.app,
iconName = app.options.iconName;
// No icon selected - render SimpleFooter
if (iconName === null) {
return ;
}
// Check if icon has been loaded
if (!Iconify.iconExists(iconName)) {
Iconify.preloadImages([iconName]);
if (!this._listener) {
this._listener = this._onIconsLoaded.bind(this);
document.addEventListener('IconifyAddedIcons', this._listener, true);
}
return ;
}
// Loaded
return ;
}
counter => {
// Do not delay for more than 1 second
return counter > 10 || Iconify.iconExists('mdi:account-check');
},
() => {
icon => !Iconify.iconExists(icon.prefix + ':' + icon.name)
);