From 9ace1405f86b87e34dde0d38785171d498ce3476 Mon Sep 17 00:00:00 2001 From: Simon Reinsperger Date: Wed, 8 Mar 2017 17:53:24 +0100 Subject: [PATCH] refactor: fixes linting errors components/SiteSidebar/index.jsx --- components/SiteSidebar/index.jsx | 105 ++++++++++++++++--------------- 1 file changed, 55 insertions(+), 50 deletions(-) diff --git a/components/SiteSidebar/index.jsx b/components/SiteSidebar/index.jsx index 814f817..88a90c1 100644 --- a/components/SiteSidebar/index.jsx +++ b/components/SiteSidebar/index.jsx @@ -1,58 +1,63 @@ -import React from 'react' -import { RouteHandler, Link } from 'react-router' -import { prefixLink } from 'gatsby-helpers' -import { config } from 'config' -import SiteNav from '../SiteNav' -import SiteLinks from '../SiteLinks' -import './style.css' -import profilePic from '../../pages/photo.jpg' +import React from 'react'; +import { Link } from 'react-router'; +import { prefixLink } from 'gatsby-helpers'; +import { config } from 'config'; +import SiteNav from '../SiteNav'; +import SiteLinks from '../SiteLinks'; +import './style.css'; +import profilePic from '../../pages/photo.jpg'; class SiteSidebar extends React.Component { - render() { - const {location, children} = this.props - const isHome = location.pathname === prefixLink('/') + render() { + const { location } = this.props; + const isHome = location.pathname === prefixLink('/'); - let header = ( -
- - - - { isHome ? ( -

{ config.siteAuthor }

- ) : -

{ config.siteAuthor }

} -

- { config.siteDescr } -

-
- ) + /* eslint-disable jsx-a11y/img-redundant-alt*/ + const header = ( +
+ + Profile picture of the author + + { isHome ? ( +

{config.siteAuthor}

+ ) : +

{config.siteAuthor}

} +

+ {config.siteDescr} +

+
+ ); + /* eslint-enable jsx-a11y/img-redundant-alt*/ - return ( -
-
-
-
- { header } -
-
-
- -
- -

- © All rights reserved. -

-
-
-
-
- ); - } + return ( +
+
+
+
+ {header} +
+
+
+ + +
+
+
+ ); + } } SiteSidebar.propTypes = { - children: React.PropTypes.any, - location: React.PropTypes.object, -} + location: React.PropTypes.object, +}; -export default SiteSidebar \ No newline at end of file +export default SiteSidebar;