1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Fix react-intl example (#4840)

react-intl does not work otherwise
This commit is contained in:
Ivan Starkov 2018-09-03 00:53:43 +03:00 committed by Tim Neutkens
parent cdf44c4f91
commit 954fcb9674

View file

@ -22,7 +22,7 @@ export default class MyApp extends App {
// Get the `locale` and `messages` from the request object on the server. // Get the `locale` and `messages` from the request object on the server.
// In the browser, use the same values that the server serialized. // In the browser, use the same values that the server serialized.
const { req } = ctx const { req } = ctx
const { locale, messages } = req || window.__NEXT_DATA__.props.pageProps const { locale, messages } = req || window.__NEXT_DATA__.props
return { pageProps, locale, messages } return { pageProps, locale, messages }
} }