feat(SW-2492): Hiding meta hreflang tags when HIDE_FOR_NEXT_RELEASE flag is true
Approved-by: Linus Flood
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { cache } from "react"
|
import { cache } from "react"
|
||||||
|
|
||||||
|
import { env } from "@/env/server"
|
||||||
import { GetAccountPageMetadata } from "@/lib/graphql/Query/AccountPage/Metadata.graphql"
|
import { GetAccountPageMetadata } from "@/lib/graphql/Query/AccountPage/Metadata.graphql"
|
||||||
import { GetCollectionPageMetadata } from "@/lib/graphql/Query/CollectionPage/Metadata.graphql"
|
import { GetCollectionPageMetadata } from "@/lib/graphql/Query/CollectionPage/Metadata.graphql"
|
||||||
import { GetContentPageMetadata } from "@/lib/graphql/Query/ContentPage/Metadata.graphql"
|
import { GetContentPageMetadata } from "@/lib/graphql/Query/ContentPage/Metadata.graphql"
|
||||||
@@ -228,8 +229,11 @@ export const metadataQueryRouter = router({
|
|||||||
|
|
||||||
if (metadata) {
|
if (metadata) {
|
||||||
if (alternates) {
|
if (alternates) {
|
||||||
|
// Hiding alternates until all languages are released in production
|
||||||
|
if (!env.HIDE_FOR_NEXT_RELEASE) {
|
||||||
metadata.alternates = alternates
|
metadata.alternates = alternates
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (input.noIndex) {
|
if (input.noIndex) {
|
||||||
metadata.robots = {
|
metadata.robots = {
|
||||||
index: false,
|
index: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user