}
render() {
+ const banner = this.props.banner;
+ const icon = this.props.icon;
return (
- <div class="position-relative mb-2">
- {this.props.banner && (
- <PictrsImage src={this.props.banner} banner alt="" />
- )}
- {this.props.icon && (
- <PictrsImage
- src={this.props.icon}
- iconOverlay
- pushup={!!this.props.banner}
- alt=""
- />
- )}
- </div>
+ (banner || icon) && (
+ <div className="banner-icon-header position-relative mb-2">
+ {banner && <PictrsImage src={banner} banner alt="" />}
+ {icon && (
+ <PictrsImage
+ src={icon}
+ iconOverlay
+ pushup={!!this.props.banner}
+ alt=""
+ />
+ )}
+ </div>
+ )
);
}
}