import React, { Component } from 'react';
import convertReactToHTMLStyle from '../utils/convertReactToHTMLStyle';

export default class NoScriptImg extends Component {
  render() {
    const { alt, style, image} = this.props;

    if(!image) {
      return null;
    }

    return (
      <noscript dangerouslySetInnerHTML={{
        __html: `
          <img
            alt='${alt}'
            style='${convertReactToHTMLStyle(style)}'
            src='${image.url}' />
        `
      }} />
    );
  }
}

@@ -334,18 +334,16 @@
  __html:
- %60
 %0A       
@@ -349,12 +349,17 @@
     
+'
 %3Cimg
+ ' +
 %0A   
@@ -367,16 +367,17 @@
         
+%60
 alt='$%7Ba
@@ -380,16 +380,20 @@
 '$%7Balt%7D'
+ %60 +
 %0A       
@@ -397,16 +397,17 @@
         
+%60
 style='$
@@ -439,16 +439,20 @@
 style)%7D'
+ %60 +
 %0A       
@@ -456,16 +456,17 @@
         
+%60
 src='$%7Bi
@@ -478,25 +478,16 @@
 url%7D' /%3E
-%0A        
 %60%0A      

Remove whitespace caused by template string