Skip to content

Commit f99e2e9

Browse files
authored
open sponsor images in new tab and add loading state (#50)
1 parent da1f197 commit f99e2e9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/sponsors/logo.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ interface LogoOptions {
1111
const Logo = ({ imgSrc, url, alt }: LogoOptions) => {
1212
const imgClass = imgSrc.width / imgSrc.height < 1.75 ? styles.tall : '';
1313

14+
if (!imgSrc.blurDataURL) {
15+
// eslint-disable-next-line no-param-reassign
16+
imgSrc.blurDataURL =
17+
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8vx8AAsMBwDLzsnQAAAAASUVORK5CYII=';
18+
}
19+
1420
return (
1521
<li className={styles.container}>
16-
<a href={url}>
22+
<a href={url} target="_blank" rel="noreferrer">
1723
<Image src={imgSrc} alt={alt} className={imgClass} />
1824
</a>
1925
</li>

0 commit comments

Comments
 (0)