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:
@@ -4,15 +4,14 @@ import { overview } from "@/constants/routes/webviews"
|
||||
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import styles from "./linkToOverview.module.css"
|
||||
|
||||
import type { LangParams } from "@/types/params"
|
||||
|
||||
export default async function LinkToOverview({ lang }: LangParams) {
|
||||
export default async function LinkToOverview() {
|
||||
const { formatMessage } = await getIntl()
|
||||
return (
|
||||
<Link className={styles.overviewLink} href={overview[lang]}>
|
||||
<Link className={styles.overviewLink} href={overview[getLang()]}>
|
||||
<ArrowLeft height={20} width={20} />{" "}
|
||||
{formatMessage({ id: "Go back to overview" })}
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user