Files
web/apps/scandic-web/components/Webviews/LinkToOverview/index.tsx
Anton Gunnarsson 8518d018f8 Merged in feat/sw-3230-move-link-to-design-system (pull request #2618)
feat(SW-3230): Move Link to design-system

* Move Link to design-system

* Remove comments


Approved-by: Linus Flood
2025-08-12 12:35:20 +00:00

28 lines
793 B
TypeScript

import { ArrowLeft } from "react-feather"
import Link from "@scandic-hotels/design-system/Link"
import { overview } from "@/constants/routes/webviews"
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 = await webviewSearchParams()
const lang = await getLang()
const overviewHref = `${overview[lang]}?${searchParams.toString()}`
return (
<Link className={styles.overviewLink} href={overviewHref}>
<ArrowLeft height={20} width={20} />
{intl.formatMessage({
defaultMessage: "Go back to overview",
})}
</Link>
)
}