Files
web/components/Webviews/LinkToOverview/index.tsx
Christian Andolf f6b3cf8b92 chore: replace function expression with inline statement
replace destructuring for better static analysis

remove unused variables
2024-11-08 09:25:28 +01:00

24 lines
738 B
TypeScript

import { ArrowLeft } from "react-feather"
import { overview } from "@/constants/routes/webviews"
import Link from "@/components/TempDesignSystem/Link"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import { webviewSearchParams } from "@/utils/webviews"
import styles from "./linkToOverview.module.css"
export default async function LinkToOverview() {
const intl = await getIntl()
const searchParams = webviewSearchParams()
const overviewHref = `${overview[getLang()]}?${searchParams.toString()}`
return (
<Link className={styles.overviewLink} href={overviewHref}>
<ArrowLeft height={20} width={20} />{" "}
{intl.formatMessage({ id: "Go back to overview" })}
</Link>
)
}