Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
upgrade next-redux-wrapper to 7.0.2 (vercel#26521)
Browse files Browse the repository at this point in the history
## Bug

- [x] Related issues linked using `fixes #number`: Fixes vercel#26338
- [ ] Integration tests added
  • Loading branch information
ThangHuuVu authored Jul 16, 2021
1 parent 725074d commit b69c2a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/with-redux-wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"dependencies": {
"next": "9.4.1",
"next-redux-wrapper": "^6.0.1",
"next-redux-wrapper": "^7.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "7.1.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-redux-wrapper/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Index = (props) => {
return <Page title="Index Page" linkTo="/other" />
}

export const getStaticProps = wrapper.getStaticProps(async ({ store }) => {
export const getStaticProps = wrapper.getStaticProps((store) => () => {
store.dispatch(serverRenderClock(true))
store.dispatch(addCount())
})
Expand Down
10 changes: 4 additions & 6 deletions examples/with-redux-wrapper/pages/other.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ const Other = (props) => {
return <Page title="Other Page" linkTo="/" />
}

export const getServerSideProps = wrapper.getServerSideProps(
async ({ store }) => {
store.dispatch(serverRenderClock(true))
store.dispatch(addCount())
}
)
export const getServerSideProps = wrapper.getServerSideProps((store) => () => {
store.dispatch(serverRenderClock(true))
store.dispatch(addCount())
})

const mapDispatchToProps = (dispatch) => {
return {
Expand Down

0 comments on commit b69c2a6

Please sign in to comment.