Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
905da6f9
Commit
905da6f9
authored
Jun 01, 2018
by
Tobi
Committed by
Tim Neutkens
Jun 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes bug in with-react-intl example: messages and locale variables were undefined on CSR (#4517)
parent
82106860
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
PageWithIntl.js
examples/with-react-intl/components/PageWithIntl.js
+1
-1
No files found.
examples/with-react-intl/components/PageWithIntl.js
View file @
905da6f9
...
...
@@ -23,7 +23,7 @@ export default (Page) => {
// Get the `locale` and `messages` from the request object on the server.
// In the browser, use the same values that the server serialized.
const
{
req
}
=
context
const
{
locale
,
messages
}
=
req
||
window
.
__NEXT_DATA__
.
props
const
{
locale
,
messages
}
=
req
||
window
.
__NEXT_DATA__
.
props
.
pageProps
// Always update the current time on page load/transition because the
// <IntlProvider> will be a new instance even with pushState routing.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment