mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-11-14 17:15:15 +01:00
package updates
This commit is contained in:
parent
4d0f674c6a
commit
d71924e1a5
@ -5,7 +5,7 @@
|
|||||||
"plugin:react/recommended",
|
"plugin:react/recommended",
|
||||||
"plugin:prettier/recommended"
|
"plugin:prettier/recommended"
|
||||||
],
|
],
|
||||||
"plugins": ["react", "graphql", "prettier"],
|
"plugins": ["react", "graphql", "prettier", "react-hooks"],
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
@ -23,7 +23,9 @@
|
|||||||
"quotes": ["error", "single"],
|
"quotes": ["error", "single"],
|
||||||
"semi": ["error", "never"],
|
"semi": ["error", "never"],
|
||||||
"object-curly-spacing": ["error", "always"],
|
"object-curly-spacing": ["error", "always"],
|
||||||
"prettier/prettier": "error"
|
"prettier/prettier": "error",
|
||||||
|
"react-hooks/rules-of-hooks": "error",
|
||||||
|
"react-hooks/exhaustive-deps": "warn"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"react": {
|
"react": {
|
||||||
|
21
package.json
21
package.json
@ -25,22 +25,22 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"file-saver": "^2.0.1",
|
"file-saver": "^2.0.1",
|
||||||
"gatsby": "^2.3.31",
|
"gatsby": "^2.7.1",
|
||||||
"gatsby-image": "^2.0.40",
|
"gatsby-image": "^2.1.1",
|
||||||
"gatsby-plugin-favicon": "^3.1.6",
|
"gatsby-plugin-favicon": "^3.1.6",
|
||||||
"gatsby-plugin-matomo": "^0.7.0",
|
"gatsby-plugin-matomo": "^0.7.0",
|
||||||
"gatsby-plugin-offline": "^2.0.25",
|
"gatsby-plugin-offline": "^2.0.25",
|
||||||
"gatsby-plugin-react-helmet": "^3.0.12",
|
"gatsby-plugin-react-helmet": "^3.0.12",
|
||||||
"gatsby-plugin-sass": "^2.0.11",
|
"gatsby-plugin-sass": "^2.0.11",
|
||||||
"gatsby-plugin-sharp": "^2.0.35",
|
"gatsby-plugin-sharp": "^2.1.1",
|
||||||
"gatsby-plugin-sitemap": "^2.0.12",
|
"gatsby-plugin-sitemap": "^2.0.12",
|
||||||
"gatsby-plugin-svgr": "^2.0.2",
|
"gatsby-plugin-svgr": "^2.0.2",
|
||||||
"gatsby-source-filesystem": "^2.0.32",
|
"gatsby-source-filesystem": "^2.0.37",
|
||||||
"gatsby-transformer-json": "^2.1.11",
|
"gatsby-transformer-json": "^2.1.11",
|
||||||
"gatsby-transformer-sharp": "^2.1.18",
|
"gatsby-transformer-sharp": "^2.1.18",
|
||||||
"gatsby-transformer-yaml": "^2.1.12",
|
"gatsby-transformer-yaml": "^2.1.12",
|
||||||
"giphy-js-sdk-core": "^1.0.6",
|
"giphy-js-sdk-core": "^1.0.6",
|
||||||
"graphql": "^14.2.1",
|
"graphql": "^14.3.1",
|
||||||
"intersection-observer": "^0.7.0",
|
"intersection-observer": "^0.7.0",
|
||||||
"js-yaml": "^3.13.1",
|
"js-yaml": "^3.13.1",
|
||||||
"node-sass": "^4.12.0",
|
"node-sass": "^4.12.0",
|
||||||
@ -56,9 +56,9 @@
|
|||||||
"vcf": "^2.0.4"
|
"vcf": "^2.0.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.4.4",
|
"@babel/core": "^7.4.5",
|
||||||
"@babel/node": "^7.2.2",
|
"@babel/node": "^7.4.5",
|
||||||
"@babel/preset-env": "^7.4.4",
|
"@babel/preset-env": "^7.4.5",
|
||||||
"@svgr/webpack": "^4.2.0",
|
"@svgr/webpack": "^4.2.0",
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
"babel-jest": "^24.7.1",
|
"babel-jest": "^24.7.1",
|
||||||
@ -69,15 +69,16 @@
|
|||||||
"eslint-plugin-graphql": "^3.0.3",
|
"eslint-plugin-graphql": "^3.0.3",
|
||||||
"eslint-plugin-prettier": "^3.0.1",
|
"eslint-plugin-prettier": "^3.0.1",
|
||||||
"eslint-plugin-react": "^7.12.4",
|
"eslint-plugin-react": "^7.12.4",
|
||||||
|
"eslint-plugin-react-hooks": "^1.6.0",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
"jest": "^24.7.1",
|
"jest": "^24.7.1",
|
||||||
"jest-canvas-mock": "^2.0.0",
|
"jest-canvas-mock": "^2.0.0",
|
||||||
"jest-dom": "^3.1.3",
|
"jest-dom": "^3.4.0",
|
||||||
"ora": "^3.4.0",
|
"ora": "^3.4.0",
|
||||||
"prepend": "^1.0.2",
|
"prepend": "^1.0.2",
|
||||||
"prettier": "^1.17.0",
|
"prettier": "^1.17.0",
|
||||||
"prettier-stylelint": "^0.4.2",
|
"prettier-stylelint": "^0.4.2",
|
||||||
"react-testing-library": "^7.0.0",
|
"react-testing-library": "^7.0.1",
|
||||||
"slugify": "^1.3.4",
|
"slugify": "^1.3.4",
|
||||||
"stylelint": "^10.0.1",
|
"stylelint": "^10.0.1",
|
||||||
"stylelint-config-css-modules": "^1.3.0",
|
"stylelint-config-css-modules": "^1.3.0",
|
||||||
|
@ -8,7 +8,7 @@ export default class AppProvider extends PureComponent {
|
|||||||
state = {
|
state = {
|
||||||
dark: false,
|
dark: false,
|
||||||
toggleDark: () => this.toggleDark,
|
toggleDark: () => this.toggleDark,
|
||||||
location: null
|
geolocation: null
|
||||||
}
|
}
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
@ -21,8 +21,8 @@ export default class AppProvider extends PureComponent {
|
|||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
this.mounted = true
|
this.mounted = true
|
||||||
const location = await getCountry()
|
const geolocation = await getCountry()
|
||||||
this.setState({ location })
|
this.setState({ geolocation })
|
||||||
this.checkDark()
|
this.checkDark()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,8 +46,8 @@ export default class AppProvider extends PureComponent {
|
|||||||
// All the checks to see if we should go dark or light
|
// All the checks to see if we should go dark or light
|
||||||
//
|
//
|
||||||
async checkTimes() {
|
async checkTimes() {
|
||||||
const { location, dark } = this.state
|
const { geolocation, dark } = this.state
|
||||||
const { sunset, sunrise } = await getLocationTimes(location)
|
const { sunset, sunrise } = await getLocationTimes(geolocation)
|
||||||
const now = new Date().getHours()
|
const now = new Date().getHours()
|
||||||
const weWantItDarkTimes = now >= sunset || now <= sunrise
|
const weWantItDarkTimes = now >= sunset || now <= sunrise
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user