File tree Expand file tree Collapse file tree 5 files changed +23
-22
lines changed Expand file tree Collapse file tree 5 files changed +23
-22
lines changed Original file line number Diff line number Diff line change @@ -67,10 +67,7 @@ export default async function LocaleLayout({
67
67
< Matomo />
68
68
</ Suspense >
69
69
70
- < BaseLayout
71
- locale = { locale }
72
- lastDeployLocaleTimestamp = { lastDeployLocaleTimestamp }
73
- >
70
+ < BaseLayout lastDeployLocaleTimestamp = { lastDeployLocaleTimestamp } >
74
71
{ children }
75
72
</ BaseLayout >
76
73
</ Providers >
Original file line number Diff line number Diff line change 1
- import { getTranslations } from "next-intl/server"
1
+ import { getLocale , getTranslations } from "next-intl/server"
2
2
3
3
import { EthHomeIcon } from "@/components/icons"
4
4
5
5
import { BaseLink } from "../ui/Link"
6
6
7
7
import ClientSideNav from "./Client"
8
8
9
- const Nav = async ( { locale } ) => {
9
+ const Nav = async ( ) => {
10
+ const locale = await getLocale ( )
10
11
const t = await getTranslations ( { locale, namespace : "common" } )
11
12
12
13
return (
Original file line number Diff line number Diff line change
1
+ import { getLocale , getTranslations } from "next-intl/server"
2
+
1
3
import { MAIN_CONTENT_ID } from "@/lib/constants"
2
4
3
5
import { BaseLink } from "./ui/Link"
4
6
5
- export const SkipLink = ( { children } : { children : string } ) => (
6
- < div className = "bg-primary-low-contrast focus-within:p-4" >
7
- < BaseLink
8
- href = { "#" + MAIN_CONTENT_ID }
9
- className = "absolute -top-14 rounded border bg-primary px-4 py-2 leading-8 text-background no-underline hover:no-underline focus:static"
10
- >
11
- { children }
12
- </ BaseLink >
13
- </ div >
14
- )
7
+ export const SkipLink = async ( ) => {
8
+ const locale = await getLocale ( )
9
+ const t = await getTranslations ( { locale, namespace : "common" } )
10
+
11
+ return (
12
+ < div className = "bg-primary-low-contrast focus-within:p-4" >
13
+ < BaseLink
14
+ href = { "#" + MAIN_CONTENT_ID }
15
+ className = "absolute -top-14 rounded border bg-primary px-4 py-2 leading-8 text-background no-underline hover:no-underline focus:static"
16
+ >
17
+ { t ( "skip-to-main-content" ) }
18
+ </ BaseLink >
19
+ </ div >
20
+ )
21
+ }
Original file line number Diff line number Diff line change 1
1
// import { join } from "path"
2
2
import dynamic from "next/dynamic"
3
- import { getTranslations } from "next-intl/server"
4
3
5
4
import type { Root } from "@/lib/types"
6
5
@@ -22,9 +21,7 @@ export const BaseLayout = async ({
22
21
// contentIsOutdated,
23
22
// contentNotTranslated,
24
23
lastDeployLocaleTimestamp,
25
- locale,
26
24
} : Root ) => {
27
- const t = await getTranslations ( { locale, namespace : "common" } )
28
25
// const { locale, asPath } = useRouter()
29
26
30
27
// const CONTRIBUTING = "/contributing/"
@@ -53,9 +50,9 @@ export const BaseLayout = async ({
53
50
* The Skip Link is positioned above the container to ensure it is not affecting the
54
51
* layout on initial load.
55
52
*/ }
56
- < SkipLink > { t ( "skip-to-main-content" ) } </ SkipLink >
53
+ < SkipLink / >
57
54
< div className = "mx-auto max-w-screen-2xl" >
58
- < Nav locale = { locale } />
55
+ < Nav />
59
56
60
57
{ /* TODO: FIX TRANSLATION BANNER LOGIC FOR https://github.com/ethereum/ethereum-org-website/issues/11305 */ }
61
58
{ /* <TranslationBanner
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ export type AppPropsWithLayout = AppProps & {
50
50
export type Root = {
51
51
children : ReactNode
52
52
lastDeployLocaleTimestamp : string
53
- locale : string
54
53
}
55
54
56
55
export type BasePageProps = Pick < Root , "lastDeployLocaleTimestamp" >
You can’t perform that action at this time.
0 commit comments