Merged in feat/SW-1381-new-startpage-page (pull request #1197)

feat(SW-1381): add initial start page

* feat(SW-1381): add initial start page

* fix: remove unused startpage template

remove translation key for middleware error page

* fix(SW-1381): add tracking SDK and feature flag to hide start page


Approved-by: Erik Tiekstra
Approved-by: Matilda Landström
Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
Christian Andolf
2025-01-23 10:18:21 +00:00
parent cf8a8a2810
commit 127bb6a0a7
20 changed files with 356 additions and 11 deletions

View File

@@ -76,4 +76,12 @@ query EntryByUrlBatch2($locale: String!, $url: String!) {
}
total
}
all_start_page(where: { url: $url }, locale: $locale) {
items {
system {
...System
}
}
total
}
}

View File

@@ -0,0 +1,47 @@
#import "../../Fragments/System.graphql"
query GetStartPage($locale: String!, $uid: String!) {
start_page(uid: $uid, locale: $locale) {
title
url
system {
...System
created_at
updated_at
}
}
trackingProps: start_page(locale: "en", uid: $uid) {
url
}
}
query GetStartPageRefs($locale: String!, $uid: String!) {
start_page(locale: $locale, uid: $uid) {
system {
...System
}
}
}
query GetDaDeEnUrlsStartPage($uid: String!) {
de: start_page(locale: "de", uid: $uid) {
url
}
en: start_page(locale: "en", uid: $uid) {
url
}
da: start_page(locale: "da", uid: $uid) {
url
}
}
query GetFiNoSvUrlsStartPage($uid: String!) {
fi: start_page(locale: "fi", uid: $uid) {
url
}
no: start_page(locale: "no", uid: $uid) {
url
}
sv: start_page(locale: "sv", uid: $uid) {
url
}
}

View File

@@ -186,3 +186,7 @@ export const getDestinationCityPage = cache(
return serverClient().contentstack.destinationCityPage.get()
}
)
export const getStartPage = cache(async function getMemoizedStartPage() {
return serverClient().contentstack.startPage.get()
})