Merged in chore/add-rel-no-follow-to-language-switcher-links (pull request #1865)

chore(SW-2369): dont index language switcher links

* chore(SW-2177): dont index language switcher links


Approved-by: Linus Flood
This commit is contained in:
Chuma Mcphoy (We Ahead)
2025-04-25 12:58:46 +00:00
parent 3a958c4dd1
commit 035653349a

View File

@@ -6,6 +6,7 @@ import { useIntl } from "react-intl"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import { type Lang, languages } from "@/constants/languages"
import { env } from "@/env/client"
import Link from "@/components/TempDesignSystem/Link"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
@@ -27,6 +28,9 @@ export default function LanguageSwitcherContent({
const urlKeys = Object.keys(urls) as Lang[]
const pathname = usePathname()
const relValue = env.NEXT_PUBLIC_HIDE_FOR_NEXT_RELEASE
? "nofollow"
: undefined
return (
<div className={styles.languageWrapper}>
@@ -45,6 +49,7 @@ export default function LanguageSwitcherContent({
<Link
className={`${styles.link} ${isActive ? styles.active : ""}`}
href={replaceUrlPart(pathname, url)}
rel={relValue}
onClick={onLanguageSwitch}
keepSearchParams
>