From e8ba29f835c702a34ee89f969e108e7ece848d56 Mon Sep 17 00:00:00 2001 From: Kay Faraday Date: Sat, 2 Jul 2022 20:51:00 +0000 Subject: [PATCH] Revert "use instead of
for avatars" This reverts commit a34b7d3b5e32b6ca7afef343558f4678583a9cda. --- app/javascript/flavours/glitch/components/avatar.js | 8 ++++---- .../flavours/glitch/components/avatar_composite.js | 6 +++--- app/javascript/mastodon/components/avatar.js | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/javascript/flavours/glitch/components/avatar.js b/app/javascript/flavours/glitch/components/avatar.js index e3a838523..c5e9072c4 100644 --- a/app/javascript/flavours/glitch/components/avatar.js +++ b/app/javascript/flavours/glitch/components/avatar.js @@ -57,14 +57,14 @@ export default class Avatar extends React.PureComponent { backgroundSize: `${size}px ${size}px`, }; - let imageSrc = staticSrc; if (hovering || animate) { - imageSrc = src; + style.backgroundImage = `url(${src})`; + } else { + style.backgroundImage = `url(${staticSrc})`; } return ( - - +
); } diff --git a/app/javascript/mastodon/components/avatar.js b/app/javascript/mastodon/components/avatar.js index aa8b96895..570505833 100644 --- a/app/javascript/mastodon/components/avatar.js +++ b/app/javascript/mastodon/components/avatar.js @@ -53,14 +53,14 @@ export default class Avatar extends React.PureComponent { backgroundSize: `${size}px ${size}px`, }; - let imageSrc = staticSrc; if (hovering || animate) { - imageSrc = src; + style.backgroundImage = `url(${src})`; + } else { + style.backgroundImage = `url(${staticSrc})`; } return ( -