/* global VERSION */
import React, {PropTypes} from 'react'
import {connect} from 'react-redux'

const Login = ({auth}) => {
  if (auth.isAuthLoading) {
    return <div className="page-spinner"></div>
  }

  return (
    <div className="auth-page">
      <div className="auth-box">
        <div className="auth-logo"></div>
        <h1 className="auth-text-logo">Chronograf</h1>
        <p><strong>{VERSION}</strong> / Time-Series Data Visualization</p>
        {auth.links.map(({name, login, label}) => (
          <a key={name} className="btn btn-primary" href={login}>
            <span className={`icon ${name}`}></span>
            Login with {label}
          </a>
        ))}
      </div>
      <p className="auth-credits">Made by <span className="icon cubo-uniform"></span>InfluxData</p>
      <div className="auth-image"></div>
    </div>
  )
}

const {
  array,
  bool,
  shape,
} = PropTypes

Login.propTypes = {
  auth: shape({
    me: shape(),
    links: array,
    isLoading: bool,
  }),
}

const mapStateToProps = ({auth}) => ({
  auth,
})

export default connect(mapStateToProps)(Login)

@@ -90,16 +90,77 @@
 redux'%0A%0A
+import Notifications from 'shared/components/Notifications'%0A%0A
 const Lo
@@ -167,24 +167,34 @@
 gin = (%7Bauth
+, location
 %7D) =%3E %7B%0A  if
@@ -281,16 +281,72 @@
 eturn (%0A
+    %3Cdiv%3E%0A      %3CNotifications location=%7Blocation%7D /%3E%0A  
     %3Cdiv
@@ -369,16 +369,18 @@
 -page%22%3E%0A
+  
       %3Cd
@@ -404,16 +404,18 @@
 h-box%22%3E%0A
+  
         
@@ -456,16 +456,18 @@
         
+  
 %3Ch1 clas
@@ -505,16 +505,18 @@
 af%3C/h1%3E%0A
+  
         
@@ -590,16 +590,18 @@
         
+ 
+ 
 %7Bauth.li
@@ -636,16 +636,18 @@
 %7D) =%3E (%0A
+  
         
@@ -704,16 +704,18 @@
 login%7D%3E%0A
+  
         
@@ -771,16 +771,18 @@
         
+  
 Login wi
@@ -802,16 +802,18 @@
         
+  
 %3C/a%3E%0A   
@@ -821,12 +821,16 @@
     
+ 
+ 
 ))%7D%0A
+  
     
@@ -834,24 +834,26 @@
      %3C/div%3E%0A
+  
       %3Cp cla
@@ -938,32 +938,34 @@
 xData%3C/p%3E%0A      
+  
 %3Cdiv className=%22
@@ -979,24 +979,37 @@
 age%22%3E%3C/div%3E%0A
+      %3C/div%3E%0A
     %3C/div%3E%0A 
@@ -1048,16 +1048,26 @@
  shape,%0A
+  string,%0A
 %7D = Prop
@@ -1171,16 +1171,64 @@
 ,%0A  %7D),%0A
+  location: shape(%7B%0A    pathname: string,%0A  %7D),%0A
 %7D%0A%0Aconst

Add Notifications to Login page