feat(SW-2492): Hiding meta hreflang tags when HIDE_FOR_NEXT_RELEASE flag is true

Approved-by: Linus Flood
This commit is contained in:
Erik Tiekstra
2025-04-30 06:29:13 +00:00
parent 05c8be489f
commit bbec6a659a

View File

@@ -1,5 +1,6 @@
import { cache } from "react"
import { env } from "@/env/server"
import { GetAccountPageMetadata } from "@/lib/graphql/Query/AccountPage/Metadata.graphql"
import { GetCollectionPageMetadata } from "@/lib/graphql/Query/CollectionPage/Metadata.graphql"
import { GetContentPageMetadata } from "@/lib/graphql/Query/ContentPage/Metadata.graphql"
@@ -228,7 +229,10 @@ export const metadataQueryRouter = router({
if (metadata) {
if (alternates) {
metadata.alternates = alternates
// Hiding alternates until all languages are released in production
if (!env.HIDE_FOR_NEXT_RELEASE) {
metadata.alternates = alternates
}
}
if (input.noIndex) {
metadata.robots = {