about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/ui/components/image_loader.jsx
diff options
context:
space:
mode:
authorChristian Schmidt <github@chsc.dk>2023-02-26 20:13:27 +0100
committerClaire <claire.github-309c@sitedethib.com>2023-03-05 17:52:53 +0100
commit0e476f3c4fbbcab9b4895b8abff93075dfd2bf0c (patch)
treeae50a1c4344476421eb36fc254ec9bbcfcfc6f8a /app/javascript/flavours/glitch/features/ui/components/image_loader.jsx
parent276c1d32d6fc857a768244c3f5d835c9c5da1747 (diff)
[Glitch] Add `lang` attribute to media and poll options
Port d3eefead3014175b264cb56f6f4cb552cbaaeac6 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components/image_loader.jsx')
-rw-r--r--app/javascript/flavours/glitch/features/ui/components/image_loader.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/image_loader.jsx b/app/javascript/flavours/glitch/features/ui/components/image_loader.jsx
index 92aeef5c4..9093eab28 100644
--- a/app/javascript/flavours/glitch/features/ui/components/image_loader.jsx
+++ b/app/javascript/flavours/glitch/features/ui/components/image_loader.jsx
@@ -8,6 +8,7 @@ export default class ImageLoader extends PureComponent {
 
   static propTypes = {
     alt: PropTypes.string,
+    lang: PropTypes.string,
     src: PropTypes.string.isRequired,
     previewSrc: PropTypes.string,
     width: PropTypes.number,
@@ -18,6 +19,7 @@ export default class ImageLoader extends PureComponent {
 
   static defaultProps = {
     alt: '',
+    lang: '',
     width: null,
     height: null,
   };
@@ -129,7 +131,7 @@ export default class ImageLoader extends PureComponent {
   };
 
   render () {
-    const { alt, src, width, height, onClick } = this.props;
+    const { alt, lang, src, width, height, onClick } = this.props;
     const { loading } = this.state;
 
     const className = classNames('image-loader', {
@@ -154,6 +156,7 @@ export default class ImageLoader extends PureComponent {
         ) : (
           <ZoomableImage
             alt={alt}
+            lang={lang}
             src={src}
             onClick={onClick}
             width={width}