1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-06-14 00:13:23 +02:00

js -> jsx

This commit is contained in:
Matthias Kretschmann 2018-04-25 23:37:23 +02:00
parent d75cd394c2
commit b3c266f821
Signed by: m
GPG Key ID: 606EEEF3C479A91F
22 changed files with 24 additions and 20 deletions

View File

@ -9,7 +9,10 @@ module.exports = {
{
resolve: 'gatsby-plugin-sass',
options: {
includePaths: [`${__dirname}/node_modules`, `${__dirname}/src/styles`],
includePaths: [
`${__dirname}/node_modules`,
`${__dirname}/src/styles`
],
},
},
{

View File

@ -4,7 +4,7 @@ exports.createPages = ({ boundActionCreators, graphql }) => {
const { createPage } = boundActionCreators
return new Promise((resolve, reject) => {
const template = path.resolve('src/templates/Project.js')
const template = path.resolve('src/templates/Project.jsx')
resolve(graphql(`
{

View File

@ -3,12 +3,12 @@
"version": "0.1.0",
"private": true,
"scripts": {
"lint:js": "eslint ./gatsby-*.js && eslint ./src/**/*.js",
"lint:css": "stylelint ./src/**/*.scss",
"lint:js": "eslint ./gatsby-*.{js,jsx} && eslint ./src/**/*.{js,jsx}",
"lint:css": "stylelint ./src/**/*.{css,scss}",
"lint": "npm run lint:js && npm run lint:css",
"build": "gatsby build",
"start": "gatsby develop",
"format": "prettier --write 'src/**/*.js'",
"format": "prettier --write 'src/**/*.{js,jsx}'",
"test": "npm run lint",
"deploy": "./deploy.sh"
},

View File

@ -24,7 +24,11 @@ class Availability extends Component {
return e
}
window.addEventListener('scroll', this.handleScroll, supportsPassive ? { passive: true } : false)
window.addEventListener(
'scroll',
this.handleScroll,
supportsPassive ? { passive: true } : false
)
}
}
@ -61,9 +65,7 @@ class Availability extends Component {
<MoveIn>
<aside
className={
status
? 'availability available'
: 'availability unavailable'
status ? 'availability available' : 'availability unavailable'
}
>
<p

View File

@ -23,7 +23,10 @@ const Header = ({ meta, isHomepage }) => {
</FadeIn>
<Social meta={meta} hide={!isHomepage} />
<Availability meta={meta} hide={!isHomepage && !meta.availability.status} />
<Availability
meta={meta}
hide={!isHomepage && !meta.availability.status}
/>
</header>
)
}

View File

@ -1,7 +0,0 @@
import React from 'react'
const NotFound = () => (
<h1>Shenanigans, page not found.</h1>
)
export default NotFound

5
src/pages/404.jsx Normal file
View File

@ -0,0 +1,5 @@
import React from 'react'
const NotFound = () => <h1>Shenanigans, page not found.</h1>
export default NotFound

View File

@ -2,9 +2,7 @@ import React from 'react'
import PropTypes from 'prop-types'
import Projects from '../components/organisms/Projects'
const Home = ({ data }) => (
<Projects data={data} />
)
const Home = ({ data }) => <Projects data={data} />
Home.propTypes = {
data: PropTypes.object,