Skip to content

Commit 82c6370

Browse files
Fix: Added fallback for avatar.io failing image (codesandbox#3525)
* Fix: Added fallback for avatar.io failing image * no early return * update emma handle Co-authored-by: Sara Vieira <hey@iamsaravieira.com>
1 parent 749d2ff commit 82c6370

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/homepage/src/pages/ide/_tweets.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ const tweets = [
1818
username: 'elijahmanor',
1919
},
2020
{
21-
name: 'Emma Wedekind',
21+
name: 'Emma Bostian',
2222
quote: 'It is by far the best online code editor I’ve ever used',
23-
URL: 'https://twitter.com/EmmaWedekind/status/1145977857203724288?s=20',
24-
username: 'EmmaWedekind',
23+
URL: 'https://twitter.com/EmmaBostian/status/1145977857203724288?s=20',
24+
username: 'EmmaBostian',
2525
},
2626
{
2727
name: 'Jen Looper',

packages/homepage/src/pages/ide/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ export default () => (
196196
<img
197197
src={`https://avatars.io/twitter/${tweet.username}`}
198198
alt={tweet.quote}
199+
onError={e => {
200+
e.target.src = `https://avatars.io/static/default_128.jpg`;
201+
}}
199202
/>
200203
<TweetAuthor>{tweet.name}</TweetAuthor>
201204
</div>

0 commit comments

Comments
 (0)