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
2865e182
Unverified
Commit
2865e182
authored
Aug 15, 2024
by
Aral Roca Gomez
Committed by
GitHub
Aug 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples: fix next-translate prod hydration error in layout (#52653)
Co-authored-by:
Lee Robinson
<
me@leerob.io
>
parent
1bf2b74f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
18 deletions
+24
-18
layout.js
examples/with-next-translate/app/layout.js
+24
-18
No files found.
examples/with-next-translate/app/layout.js
View file @
2865e182
...
@@ -6,25 +6,31 @@ export const metadata = {
...
@@ -6,25 +6,31 @@ export const metadata = {
};
};
export
default
function
Layout
(
props
)
{
export
default
function
Layout
(
props
)
{
const
{
t
}
=
useTranslation
();
const
{
t
,
lang
}
=
useTranslation
();
return
(
return
(
<
div
className
=
"container"
>
<
html
lang
=
{
lang
}
>
{
props
.
children
}
<
body
className
=
"container"
>
<
footer
>
{
props
.
children
}
<
span
>
{
t
(
"common:powered"
)}
<
/span
>
<
footer
>
<
a
href
=
"https://vercel.com"
target
=
"_blank"
rel
=
"noopener noreferrer"
>
<
span
>
{
t
(
"common:powered"
)}
<
/span
>
▲
vercel
<
a
<
/a
>
href
=
"https://vercel.com"
<
span
>&
amp
;
<
/span
>
target
=
"_blank"
<
a
rel
=
"noopener noreferrer"
href
=
"https://github.com/vinissimus/next-translate"
>
target
=
"_blank"
▲
Vercel
rel
=
"noopener noreferrer"
<
/a
>
>
<
span
>&
amp
;
<
/span
>
next
-
translate
<
a
<
/a
>
href
=
"https://github.com/vinissimus/next-translate"
<
/footer
>
target
=
"_blank"
<
/div
>
rel
=
"noopener noreferrer"
>
next
-
translate
<
/a
>
<
/footer
>
<
/body
>
<
/html
>
);
);
}
}
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