You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/index.js
+3-5
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ import Head from 'next/head'
2
2
importHeaderfrom'@components/Header'
3
3
importFooterfrom'@components/Footer'
4
4
5
-
exportdefaultfunctionHome({locale}){
5
+
exportdefaultfunctionHome(){
6
6
return(
7
7
<divclassName="container">
8
8
<Head>
@@ -14,7 +14,7 @@ export default function Home({locale}) {
14
14
<Headertitle="Welcome to my app!"/>
15
15
<p>In v3 of the next plugin, the <code>NEXT_LOCALE</code> and the `Accept-Language` header is not detected. This is fixed in v4. The workaround is manually detecting if the cookie and header exist and changing the behavior of your site in consequence.</p>
16
16
<pclassName="description">
17
-
<strong>Locale: {locale}</strong>
17
+
<strong>Locale in url</strong>
18
18
</p>
19
19
</main>
20
20
@@ -33,8 +33,6 @@ export async function getServerSideProps(context) {
33
33
: context?.req?.locale||"";
34
34
35
35
return{
36
-
props: {
37
-
locale
38
-
},// will be passed to the page component as props
0 commit comments