import React from 'react'; import get from 'lodash/get'; import Link from 'gatsby-link'; import Menu from '../Menu'; import Links from '../Links'; import profilePic from '../../pages/photo.jpg'; import './style.scss'; class Sidebar extends React.Component { render() { const { location } = this.props; const { author, subtitle, copyright, menu } = this.props.siteMetadata; const isHomePage = get(location, 'pathname', '/') === '/'; /* eslint-disable jsx-a11y/img-redundant-alt */ const authorBlock = (
{author.name} { isHomePage ? (

{author.name}

) :

{author.name}

}

{subtitle}

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

{copyright}

); } } export default Sidebar; export const conponentQuery = graphql` fragment sidebarFragment on siteMetadata_2{ title subtitle copyright menu { label path } author { name email telegram twitter github rss vk } } `;