import { ArrowLeft } from "react-feather"

import { overview } from "@/constants/routes/webviews"

import Link from "@/components/TempDesignSystem/Link"
import { getIntl } from "@/i18n"

import styles from "./linkToOverview.module.css"

import type { LangParams } from "@/types/params"

export default async function LinkToOverview({ lang }: LangParams) {
  const { formatMessage } = await getIntl()
  return (
    <Link className={styles.overviewLink} href={overview[lang]}>
      <ArrowLeft height={20} width={20} />{" "}
      {formatMessage({ id: "Go back to overview" })}
    </Link>
  )
}
