import React, { PropTypes } from 'react';
import Helmet from 'react-helmet';

const Head = ({ title }) => (
  <Helmet
    meta={[{
      charset: 'utf-8'
    }, {
      name: 'viewport',
      content: 'width=device-width, initial-scale=1.0'
    }]}
    defaultTitle={title}
    titleTemplate={`${title} | %s`}
    script={[{
      type: 'text/javascript',
      src: 'https://use.typekit.net/yaa3wrc.js'
    }, {
      type: 'text/javascript',
      innerHTML: 'try{Typekit.load({ async: true });}catch(e){}'
    }]}/>
);

Head.propTypes = {
  title: PropTypes.string.isRequired
};

export default Head;

@@ -119,17 +119,87 @@
     
-meta=%7B%5B%7B%0A
+defaultTitle=%7Btitle%7D%0A    titleTemplate=%7B%60$%7Btitle%7D %7C %25s%60%7D%0A    meta=%7B%5B%0A      %7B%0A  
     
@@ -217,29 +217,39 @@
 'utf-8'%0A    
-%7D,
+  %7D,%0A     
  %7B%0A
+  
       name: 
@@ -256,24 +256,26 @@
 'viewport',%0A
+  
       conten
@@ -325,71 +325,17 @@
     
-%7D%5D%7D%0A    defaultTitle=%7Btitle%7D%0A    titleTemplate=%7B%60$%7Btitle%7D %7C %25s%60
+  %7D%0A    %5D
 %7D%0A  
@@ -345,18 +345,27 @@
 cript=%7B%5B
-%7B
 %0A
+      %7B%0A  
       ty
@@ -393,16 +393,18 @@
 ,%0A      
+  
 src: 'ht
@@ -441,18 +441,26 @@
 js'%0A    
-%7D,
+  %7D,%0A     
  %7B%0A     
@@ -456,24 +456,26 @@
     %7B%0A      
+ 
+ 
 type: 'text/
@@ -483,24 +483,26 @@
 avascript',%0A
+  
       innerH
@@ -558,17 +558,24 @@
 %7B%7D'%0A    
-%7D
+  %7D%0A    
 %5D%7D/%3E%0A);%0A

clean up helmet component