Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) Breaking changes in Gatsby 3.0 #60

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
"/lib"
],
"dependencies": {
"@babel/runtime": "^7.0.0",
"lodash": "^4.17.11",
"react": "^16.8.1",
"react-dom": "^16.8.1",
"react-modal": "^3.8.1"
"@babel/runtime": "^7.13.10",
"lodash": "^4.17.21",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-modal": "^3.12.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/cli": "^7.13.10",
"@babel/core": "^7.13.10",
"babel-plugin-lodash": "^3.3.4",
"babel-preset-gatsby-package": "^0.1.3",
"cross-env": "^5.0.5"
"babel-preset-gatsby-package": "^1.1.0",
"cross-env": "^7.0.3"
}
}
4 changes: 2 additions & 2 deletions src/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import replaceComponentRenderer from './replaceComponentRenderer'
import wrapPageElement from './wrapPageElement'
import shouldUpdateScroll from './shouldUpdateScroll'
import onClientEntry from './onClientEntry'

export {
onClientEntry,
replaceComponentRenderer,
wrapPageElement,
shouldUpdateScroll
}
8 changes: 4 additions & 4 deletions src/replaceComponentRenderer.js → src/wrapPageElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const withoutPrefix = (path) => {
return path.slice(prefix ? prefix.length : 0)
}

class ReplaceComponentRenderer extends React.Component {
class WrapPageElement extends React.Component {
state = {
prevProps: null,
lastModalProps: null,
Expand Down Expand Up @@ -136,9 +136,9 @@ class ReplaceComponentRenderer extends React.Component {
}
}

const replaceComponentRenderer = ({ props }, opts) => {
const wrapPageElement = ({ props }, opts) => {
const { modalProps } = opts
return React.createElement(ReplaceComponentRenderer, { ...props, modalProps })
return React.createElement(WrapPageElement, { ...props, modalProps })
}

export default replaceComponentRenderer
export default wrapPageElement
Loading