fix: add content-page handling in languageSwitcher query
This commit is contained in:
committed by
Erik Tiekstra
parent
8220a39a8f
commit
a01aa10bf2
@@ -5,6 +5,10 @@ import {
|
||||
GetDaDeEnUrlsAccountPage,
|
||||
GetFiNoSvUrlsAccountPage,
|
||||
} from "@/lib/graphql/Query/AccountPage.graphql"
|
||||
import {
|
||||
GetDaDeEnUrlsContentPage,
|
||||
GetFiNoSvUrlsContentPage,
|
||||
} from "@/lib/graphql/Query/ContentPage.graphql"
|
||||
import {
|
||||
GetDaDeEnUrlsHotelPage,
|
||||
GetFiNoSvUrlsHotelPage,
|
||||
@@ -101,6 +105,20 @@ async function getLanguageSwitcher(options: LanguageSwitcherVariables) {
|
||||
tags: tagsFiNoSv,
|
||||
},
|
||||
])
|
||||
case PageTypeEnum.contentPage:
|
||||
return await batchRequest<LanguageSwitcherQueryDataRaw>([
|
||||
{
|
||||
document: GetDaDeEnUrlsContentPage,
|
||||
variables,
|
||||
tags: tagsDaDeEn,
|
||||
},
|
||||
{
|
||||
document: GetFiNoSvUrlsContentPage,
|
||||
variables,
|
||||
tags: tagsFiNoSv,
|
||||
},
|
||||
])
|
||||
|
||||
default:
|
||||
console.error(`type: [${options.contentType}]`)
|
||||
console.error(`Trying to get a content type that is not supported`)
|
||||
|
||||
Reference in New Issue
Block a user