Fix eslint errors
This commit is contained in:
parent
f856fe0060
commit
d0552c19b2
10 changed files with 179 additions and 139 deletions
|
|
@ -1,59 +1,65 @@
|
|||
import React from 'react';
|
||||
import { RouteHandler, Link } from 'react-router';
|
||||
import { Container, Grid, Breakpoint, Span } from 'react-responsive-grid';
|
||||
import { link } from 'gatsby-helpers';
|
||||
import React from 'react'
|
||||
import { RouteHandler, Link } from 'react-router'
|
||||
import { Container } from 'react-responsive-grid'
|
||||
import { link } from 'gatsby-helpers'
|
||||
import { rhythm, fontSizeToMS } from 'utils/typography'
|
||||
import { config } from 'config'
|
||||
|
||||
import '../css/styles.css';
|
||||
import '../css/styles.css'
|
||||
|
||||
export default class extends React.Component {
|
||||
render() {
|
||||
let header;
|
||||
if (this.props.state.path === link('/')) {
|
||||
propTypes () {
|
||||
return {
|
||||
route: React.PropTypes.object,
|
||||
}
|
||||
}
|
||||
render () {
|
||||
let header
|
||||
if (this.props.route.path === link('/')) {
|
||||
header = (
|
||||
<h1
|
||||
style={{
|
||||
fontSize: fontSizeToMS(2.5).fontSize,
|
||||
lineHeight: fontSizeToMS(2.5).lineHeight,
|
||||
marginBottom: rhythm(1.5)
|
||||
marginBottom: rhythm(1.5),
|
||||
}}
|
||||
>
|
||||
<Link
|
||||
style={{
|
||||
textDecoration: 'none',
|
||||
color: 'inherit'
|
||||
color: 'inherit',
|
||||
}}
|
||||
to={link('/')}
|
||||
>
|
||||
{this.props.config.blogTitle}
|
||||
{config.blogTitle}
|
||||
</Link>
|
||||
</h1>
|
||||
);
|
||||
)
|
||||
} else {
|
||||
header = (
|
||||
<h3>
|
||||
<Link
|
||||
style={{
|
||||
textDecoration: 'none',
|
||||
color: 'inherit'
|
||||
color: 'inherit',
|
||||
}}
|
||||
to={link('/')}
|
||||
>
|
||||
{this.props.config.blogTitle}
|
||||
{config.blogTitle}
|
||||
</Link>
|
||||
</h3>
|
||||
);
|
||||
)
|
||||
}
|
||||
return (
|
||||
<Container
|
||||
style={{
|
||||
maxWidth: rhythm(24),
|
||||
padding: `${rhythm(2)} ${rhythm(1/2)}`
|
||||
padding: `${rhythm(2)} ${rhythm(1/2)}`,
|
||||
}}
|
||||
>
|
||||
{header}
|
||||
<RouteHandler {...this.props}/>
|
||||
</Container>
|
||||
);
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue