mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 22:31:13 +00:00
fix: Cleaner logic
This commit is contained in:
parent
cf5c8a1c07
commit
0d302c0e40
1 changed files with 15 additions and 13 deletions
|
@ -14,7 +14,8 @@ 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 (
|
||||||
|
(banner || icon) && (
|
||||||
<div className="position-relative mb-2">
|
<div className="position-relative mb-2">
|
||||||
{banner && <PictrsImage src={banner} banner alt="" />}
|
{banner && <PictrsImage src={banner} banner alt="" />}
|
||||||
{icon && (
|
{icon && (
|
||||||
|
@ -26,6 +27,7 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : null;
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue