1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-09-28 03:58:47 +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', resolve: 'gatsby-plugin-sass',
options: { 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 const { createPage } = boundActionCreators
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const template = path.resolve('src/templates/Project.js') const template = path.resolve('src/templates/Project.jsx')
resolve(graphql(` resolve(graphql(`
{ {

View File

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

View File

@ -24,7 +24,11 @@ class Availability extends Component {
return e 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> <MoveIn>
<aside <aside
className={ className={
status status ? 'availability available' : 'availability unavailable'
? 'availability available'
: 'availability unavailable'
} }
> >
<p <p

View File

@ -23,7 +23,10 @@ const Header = ({ meta, isHomepage }) => {
</FadeIn> </FadeIn>
<Social meta={meta} hide={!isHomepage} /> <Social meta={meta} hide={!isHomepage} />
<Availability meta={meta} hide={!isHomepage && !meta.availability.status} /> <Availability
meta={meta}
hide={!isHomepage && !meta.availability.status}
/>
</header> </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 PropTypes from 'prop-types'
import Projects from '../components/organisms/Projects' import Projects from '../components/organisms/Projects'
const Home = ({ data }) => ( const Home = ({ data }) => <Projects data={data} />
<Projects data={data} />
)
Home.propTypes = { Home.propTypes = {
data: PropTypes.object, data: PropTypes.object,