Merged in feature/refactor-lang (pull request #387)
feat: SW-238 Avoid prop drilling of lang Approved-by: Michael Zetterberg
This commit is contained in:
@@ -7,12 +7,11 @@ import Divider from "@/components/TempDesignSystem/Divider"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import styles from "./sidebar.module.css"
|
||||
|
||||
import type { LangParams } from "@/types/params"
|
||||
|
||||
export default async function SidebarMyPages({ lang }: LangParams) {
|
||||
export default async function SidebarMyPages() {
|
||||
const navigation = await serverClient().contentstack.myPages.navigation.get()
|
||||
const { formatMessage } = await getIntl()
|
||||
if (!navigation) {
|
||||
@@ -43,7 +42,7 @@ export default async function SidebarMyPages({ lang }: LangParams) {
|
||||
<li>
|
||||
<Link
|
||||
color="burgundy"
|
||||
href={logout[lang]}
|
||||
href={logout[getLang()]}
|
||||
prefetch={false}
|
||||
size="small"
|
||||
variant="sidebar"
|
||||
|
||||
Reference in New Issue
Block a user