Skip to content

Commit 0adf620

Browse files
committed
simplify ternary
1 parent 286d0bd commit 0adf620

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/banner/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ export function Banner() {
148148
setBanner({...matchingBanner, hash});
149149
}, []);
150150

151-
return banner ? (
151+
if (!banner) {
152+
return null;
153+
}
154+
return (
152155
<div className={[styles['promo-banner']].filter(Boolean).join(' ')}>
153156
<div className={styles['promo-banner-message']}>
154157
<span className="flex flex-col md:flex-row gap-4">
@@ -171,5 +174,5 @@ export function Banner() {
171174
×
172175
</button>
173176
</div>
174-
) : null;
177+
);
175178
}

0 commit comments

Comments
 (0)