From: Jay Sitter Date: Sat, 17 Jun 2023 19:32:29 +0000 (-0400) Subject: fix: Cleaner logic X-Git-Url: http://these/git/%7B%60https:/readmes/README.ja.md?a=commitdiff_plain;h=0d302c0e40c52a15d39f0531c4d1af56bd9d873e;p=lemmy-ui.git fix: Cleaner logic --- diff --git a/src/shared/components/common/banner-icon-header.tsx b/src/shared/components/common/banner-icon-header.tsx index d2fae2e..7028ef4 100644 --- a/src/shared/components/common/banner-icon-header.tsx +++ b/src/shared/components/common/banner-icon-header.tsx @@ -14,18 +14,20 @@ export class BannerIconHeader extends Component { render() { const banner = this.props.banner; const icon = this.props.icon; - return banner || icon ? ( -
- {banner && } - {icon && ( - - )} -
- ) : null; + return ( + (banner || icon) && ( +
+ {banner && } + {icon && ( + + )} +
+ ) + ); } }