File tree Expand file tree Collapse file tree 5 files changed +6
-9
lines changed Expand file tree Collapse file tree 5 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export default async function LocaleLayout({
46
46
// Enable static rendering
47
47
setRequestLocale ( locale )
48
48
49
- const allMessages = await getMessages ( { locale } )
49
+ const allMessages = await getMessages ( )
50
50
const messages = pick ( allMessages , "common" )
51
51
52
52
const lastDeployDate = getLastDeployDate ( )
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
157
157
if ( ! LOCALES_CODES . includes ( locale ) ) return notFound ( )
158
158
159
159
setRequestLocale ( locale )
160
+
160
161
const t = await getTranslations ( { locale, namespace : "page-index" } )
161
162
const tCommon = await getTranslations ( { locale, namespace : "common" } )
162
163
const { direction : dir , isRtl } = getDirection ( locale )
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import { Languages, SearchIcon } from "lucide-react"
2
2
import { getLocale , getTranslations } from "next-intl/server"
3
3
import { Trigger as TabsTrigger } from "@radix-ui/react-tabs"
4
4
5
- import { Lang } from "@/lib/types"
6
-
7
5
import LanguagePicker from "@/components/LanguagePicker"
8
6
import ExpandIcon from "@/components/Nav/MobileMenu/ExpandIcon"
9
7
import LvlAccordion from "@/components/Nav/MobileMenu/LvlAccordion"
@@ -117,7 +115,7 @@ export default async function MobileMenu({
117
115
118
116
async function NavigationContent ( { className } : { className ?: string } ) {
119
117
const locale = await getLocale ( )
120
- const linkSections = await getNavigation ( locale as Lang )
118
+ const linkSections = await getNavigation ( )
121
119
122
120
return (
123
121
< nav className = { cn ( "p-0" , className ) } >
Original file line number Diff line number Diff line change 1
- import { getLocale , getTranslations } from "next-intl/server"
1
+ import { getTranslations } from "next-intl/server"
2
2
3
3
import { EthHomeIcon } from "@/components/icons"
4
4
@@ -10,8 +10,7 @@ import { DesktopNavLoading, MobileNavLoading } from "./loading"
10
10
import MobileNav from "./MobileNav"
11
11
12
12
const Nav = async ( ) => {
13
- const locale = await getLocale ( )
14
- const t = await getTranslations ( { locale, namespace : "common" } )
13
+ const t = await getTranslations ( { namespace : "common" } )
15
14
16
15
return (
17
16
< nav
Original file line number Diff line number Diff line change @@ -32,9 +32,8 @@ export const getLanguagesDisplayInfo = async (): Promise<
32
32
} )
33
33
}
34
34
35
- export const getNavigation = async ( locale : Lang ) => {
35
+ export const getNavigation = async ( ) => {
36
36
const t = await getTranslations ( {
37
- locale,
38
37
namespace : "common" ,
39
38
} )
40
39
You can’t perform that action at this time.
0 commit comments