feat: add ability to access localized entries of Hotel pages through language switcher
This commit is contained in:
@@ -5,6 +5,10 @@ import {
|
||||
GetDaDeEnUrlsAccountPage,
|
||||
GetFiNoSvUrlsAccountPage,
|
||||
} from "@/lib/graphql/Query/AccountPage.graphql"
|
||||
import {
|
||||
GetDaDeEnUrlsHotelPage,
|
||||
GetFiNoSvUrlsHotelPage,
|
||||
} from "@/lib/graphql/Query/HotelPage.graphql"
|
||||
import {
|
||||
GetDaDeEnUrlsCurrentBlocksPage,
|
||||
GetFiNoSvUrlsCurrentBlocksPage,
|
||||
@@ -84,6 +88,19 @@ async function getLanguageSwitcher(options: LanguageSwitcherVariables) {
|
||||
tags: tagsFiNoSv,
|
||||
},
|
||||
])
|
||||
case PageTypeEnum.hotelPage:
|
||||
return await batchRequest<LanguageSwitcherQueryDataRaw>([
|
||||
{
|
||||
document: GetDaDeEnUrlsHotelPage,
|
||||
variables,
|
||||
tags: tagsDaDeEn,
|
||||
},
|
||||
{
|
||||
document: GetFiNoSvUrlsHotelPage,
|
||||
variables,
|
||||
tags: tagsFiNoSv,
|
||||
},
|
||||
])
|
||||
default:
|
||||
console.info(`type: [${options.contentType}]`)
|
||||
console.error(`Trying to get a content type that is not supported`)
|
||||
|
||||
Reference in New Issue
Block a user