Skip to content

Commit 1ce0760

Browse files
committed
update gatsby example
1 parent 4df596a commit 1ce0760

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3167
-1810
lines changed

packages/react-google-maps-api-gatsby-example/. eslintrc

Whitespace-only changes.

packages/react-google-maps-api-gatsby-example/.babelrc

Lines changed: 0 additions & 30 deletions
This file was deleted.

packages/react-google-maps-api-gatsby-example/package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@react-google-maps/gatsby-example",
33
"description": "React Google Maps Gatsby.js example",
4-
"version": "1.9.2",
4+
"version": "2.19.0",
55
"author": {
66
"name": "Alexey Lyakhov",
77
"email": "[email protected]",
@@ -14,40 +14,40 @@
1414
"access": "public"
1515
},
1616
"resolutions": {
17-
"@babel/core": "7.20.12"
17+
"@babel/core": "7.22.9"
1818
},
1919
"dependencies": {
20-
"@babel/core": "7.20.12",
21-
"@babel/node": "7.20.7",
22-
"@babel/preset-env": "7.20.2",
23-
"@babel/preset-react": "7.18.6",
24-
"@babel/runtime": "7.20.13",
25-
"@react-google-maps/api": "2.18.1",
26-
"@sentry/browser": "7.34.0",
20+
"@babel/core": "7.22.9",
21+
"@babel/node": "7.22.6",
22+
"@babel/preset-env": "7.22.9",
23+
"@babel/preset-react": "7.22.5",
24+
"@babel/runtime": "7.22.6",
25+
"@react-google-maps/api": "2.19.0",
26+
"@sentry/browser": "7.58.1",
2727
"cross-env": "7.0.3",
28-
"gatsby": "5.5.0",
29-
"gatsby-plugin-manifest": "5.5.0",
28+
"gatsby": "5.11.0",
29+
"gatsby-plugin-manifest": "5.11.0",
3030
"gatsby-plugin-purgecss": "6.2.1",
31-
"gatsby-plugin-react-helmet": "6.5.0",
32-
"gatsby-plugin-sitemap": "6.5.0",
33-
"gatsby-plugin-typescript": "5.5.0",
34-
"immutable": "4.2.2",
31+
"gatsby-plugin-react-helmet": "6.11.0",
32+
"gatsby-plugin-sitemap": "6.11.0",
33+
"gatsby-plugin-typescript": "5.11.0",
34+
"immutable": "4.3.1",
3535
"intl": "1.2.5",
3636
"prop-types": "15.8.1",
3737
"react-helmet": "6.1.0",
38-
"react-redux": "8.0.5",
38+
"react-redux": "8.1.1",
3939
"react-refresh": "0.14.0",
4040
"redux": "4.2.1",
41-
"redux-actions": "2.6.5",
41+
"redux-actions": "3.0.0",
4242
"redux-immutable": "4.0.0",
4343
"redux-thunk": "2.4.2",
44-
"stylelint": "14.14.1",
44+
"stylelint": "15.10.1",
4545
"stylelint-a11y": "1.2.3",
46-
"stylelint-config-css-modules": "4.1.0",
47-
"stylelint-config-recommended": "9.0.0",
48-
"stylelint-config-standard": "29.0.0",
46+
"stylelint-config-css-modules": "4.2.0",
47+
"stylelint-config-recommended": "13.0.0",
48+
"stylelint-config-standard": "34.0.0",
4949
"stylelint-css-modules": "1.2.2",
50-
"stylelint-high-performance-animation": "1.6.0",
50+
"stylelint-high-performance-animation": "1.8.0",
5151
"uniqid": "5.4.0"
5252
},
5353
"keywords": [
@@ -70,12 +70,12 @@
7070
"update": "npm-check -u"
7171
},
7272
"devDependencies": {
73-
"@babel/plugin-transform-runtime": "7.19.6",
73+
"@babel/plugin-transform-runtime": "7.22.9",
7474
"babel-eslint": "10.1.0",
7575
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
76-
"jest": "29.2.2",
77-
"jest-cli": "29.2.2",
78-
"rimraf": "3.0.2"
76+
"jest": "29.6.1",
77+
"jest-cli": "29.6.1",
78+
"rimraf": "5.0.1"
7979
},
8080
"repository": {
8181
"type": "git",

packages/react-google-maps-api-gatsby-example/src/components/button-load-script.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { memo } from 'react'
1+
// eslint-disable-next-line node/no-extraneous-import
2+
import { memo, useCallback } from 'react'
23
import { useSelector, useDispatch } from 'react-redux'
34

45
import { toggleLoadScript } from '../actions/app'
@@ -15,7 +16,7 @@ function selector(state) {
1516
function ButtonLoadScript() {
1617
const dispatch = useDispatch()
1718

18-
const onClick = React.useCallback(() => {
19+
const onClick = useCallback(() => {
1920
dispatch(toggleLoadScript())
2021
}, [dispatch])
2122

packages/react-google-maps-api-gatsby-example/src/components/card.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as React from 'react'
1+
// eslint-disable-next-line node/no-extraneous-import
2+
import { memo } from 'react'
23
import PropTypes from 'prop-types'
34

45
function Card({ children }) {
@@ -13,4 +14,4 @@ Card.propTypes = {
1314
children: PropTypes.node.isRequired,
1415
}
1516

16-
export default React.memo(Card)
17+
export default memo(Card)

packages/react-google-maps-api-gatsby-example/src/components/checkbox-bicycling.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as React from 'react'
1+
// eslint-disable-next-line node/no-extraneous-import
2+
import { memo } from 'react'
23
import { useDispatch, useSelector } from 'react-redux'
34

45
import { toggleBicycling } from '../actions/app'
@@ -41,4 +42,4 @@ function CheckboxBicycling() {
4142
)
4243
}
4344

44-
export default React.memo(CheckboxBicycling)
45+
export default memo(CheckboxBicycling)

packages/react-google-maps-api-gatsby-example/src/components/checkbox-data.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as React from 'react'
1+
// eslint-disable-next-line node/no-extraneous-import
2+
import { memo , useCallback } from 'react'
23
import { useSelector, useDispatch } from 'react-redux'
34

45
import { toggleData } from '../actions/app'
@@ -14,7 +15,7 @@ function selector(state) {
1415
function CheckboxData() {
1516
const dispatch = useDispatch()
1617

17-
const onChange = React.useCallback(
18+
const onChange = useCallback(
1819
({ target: { checked } }) => {
1920
dispatch(
2021
toggleData({
@@ -44,4 +45,4 @@ function CheckboxData() {
4445
)
4546
}
4647

47-
export default React.memo(CheckboxData)
48+
export default memo(CheckboxData)

packages/react-google-maps-api-gatsby-example/src/components/checkbox-directions.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as React from 'react'
1+
// eslint-disable-next-line node/no-extraneous-import
2+
import { memo, useCallback } from 'react'
23
import { useSelector, useDispatch } from 'react-redux'
34

45
import { toggleDirections } from '../actions/app'
@@ -12,7 +13,7 @@ function selector(state) {
1213
function CheckboxDirections() {
1314
const dispatch = useDispatch()
1415

15-
const onChange = React.useCallback(
16+
const onChange = useCallback(
1617
({ target: { checked } }) => {
1718
dispatch(
1819
toggleDirections({
@@ -42,4 +43,4 @@ function CheckboxDirections() {
4243
)
4344
}
4445

45-
export default React.memo(CheckboxDirections)
46+
export default memo(CheckboxDirections)

packages/react-google-maps-api-gatsby-example/src/components/checkbox-drawing.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as React from 'react'
1+
// eslint-disable-next-line node/no-extraneous-import
2+
import { memo, useCallback } from 'react'
23
import { useSelector, useDispatch } from 'react-redux'
34

45
import { toggleDrawing } from '../actions/app'
@@ -11,7 +12,7 @@ function selector(state) {
1112

1213
function CheckboxDrawing() {
1314
const dispatch = useDispatch()
14-
const onChange = React.useCallback(
15+
const onChange = useCallback(
1516
({ target: { checked } }) => {
1617
dispatch(
1718
toggleDrawing({
@@ -39,4 +40,4 @@ function CheckboxDrawing() {
3940
)
4041
}
4142

42-
export default React.memo(CheckboxDrawing)
43+
export default memo(CheckboxDrawing)

packages/react-google-maps-api-gatsby-example/src/components/checkbox-ground.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as React from 'react'
1+
// eslint-disable-next-line node/no-extraneous-import
2+
import { memo, useCallback } from 'react'
23
import { useSelector, useDispatch } from 'react-redux'
34

45
import { toggleGround } from '../actions/app'
@@ -11,7 +12,8 @@ function selector(state) {
1112

1213
function CheckboxGround() {
1314
const dispatch = useDispatch()
14-
const onChange = React.useCallback(
15+
16+
const onChange = useCallback(
1517
({ target: { checked } }) => {
1618
dispatch(
1719
toggleGround({
@@ -21,7 +23,9 @@ function CheckboxGround() {
2123
},
2224
[dispatch]
2325
)
26+
2427
const value = useSelector(selector)
28+
2529
return (
2630
<div className='custom-control custom-checkbox'>
2731
<input
@@ -39,4 +43,4 @@ function CheckboxGround() {
3943
)
4044
}
4145

42-
export default React.memo(CheckboxGround)
46+
export default memo(CheckboxGround)

0 commit comments

Comments
 (0)