fix: Cleaner logic
This commit is contained in:
parent
cf5c8a1c07
commit
0d302c0e40
1 changed files with 15 additions and 13 deletions
|
@ -14,18 +14,20 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
|
||||||
render() {
|
render() {
|
||||||
const banner = this.props.banner;
|
const banner = this.props.banner;
|
||||||
const icon = this.props.icon;
|
const icon = this.props.icon;
|
||||||
return banner || icon ? (
|
return (
|
||||||
<div className="position-relative mb-2">
|
(banner || icon) && (
|
||||||
{banner && <PictrsImage src={banner} banner alt="" />}
|
<div className="position-relative mb-2">
|
||||||
{icon && (
|
{banner && <PictrsImage src={banner} banner alt="" />}
|
||||||
<PictrsImage
|
{icon && (
|
||||||
src={icon}
|
<PictrsImage
|
||||||
iconOverlay
|
src={icon}
|
||||||
pushup={!!this.props.banner}
|
iconOverlay
|
||||||
alt=""
|
pushup={!!this.props.banner}
|
||||||
/>
|
alt=""
|
||||||
)}
|
/>
|
||||||
</div>
|
)}
|
||||||
) : null;
|
</div>
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue