fix: Cleaner logic

This commit is contained in:
Jay Sitter 2023-06-17 15:32:29 -04:00
parent cf5c8a1c07
commit 0d302c0e40

View file

@ -14,7 +14,8 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
render() {
const banner = this.props.banner;
const icon = this.props.icon;
return banner || icon ? (
return (
(banner || icon) && (
<div className="position-relative mb-2">
{banner && <PictrsImage src={banner} banner alt="" />}
{icon && (
@ -26,6 +27,7 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
/>
)}
</div>
) : null;
)
);
}
}