feat(SW-187): Footer data from contentstack

This commit is contained in:
Pontus Dreij
2024-08-28 08:30:45 +02:00
parent 2fcbaa62e4
commit da51bd88fe
14 changed files with 370 additions and 21 deletions

View File

@@ -0,0 +1,12 @@
fragment AppDownloads on Footer {
app_downloads {
title
links {
type
href {
href
title
}
}
}
}

View File

@@ -0,0 +1,29 @@
fragment MainLinks on Footer {
main_links {
title
open_in_new_tab
link {
href
title
}
pageConnection {
edges {
node {
__typename
... on AccountPage {
title
url
}
... on LoyaltyPage {
title
url
}
... on ContentPage {
title
url
}
}
}
}
}
}

View File

@@ -0,0 +1,18 @@
fragment MainLinksRef on Footer {
__typename
main_links {
pageConnection {
edges {
node {
__typename
...LoyaltyPageRef
...ContentPageRef
...AccountPageRef
}
}
}
}
system {
...System
}
}

View File

@@ -0,0 +1,20 @@
fragment SecondaryLinksRef on Footer {
__typename
secondary_links {
links {
pageConnection {
edges {
node {
__typename
...LoyaltyPageRef
...ContentPageRef
...AccountPageRef
}
}
}
}
}
system {
...System
}
}

View File

@@ -0,0 +1,24 @@
#import "../Refs/MyPages/AccountPage.graphql"
#import "../Refs/ContentPage/ContentPage.graphql"
#import "../Refs/LoyaltyPage/LoyaltyPage.graphql"
fragment SecondaryLinks on Footer {
secondary_links {
title
links {
title
open_in_new_tab
pageConnection {
edges {
node {
__typename
}
}
}
link {
href
title
}
}
}
}

View File

@@ -0,0 +1,28 @@
#import "../Fragments/Footer/AppDownloads.graphql"
#import "../Fragments/Footer/MainLinks.graphql"
#import "../Fragments/Footer/SecondaryLinks.graphql"
#import "../Fragments/Footer/Refs/MainLinks.graphql"
#import "../Fragments/Footer/Refs/SecondaryLinks.graphql"
#import "../Fragments/Refs/System.graphql"
query GetFooter($locale: String!) {
all_footer(limit: 1, locale: $locale) {
items {
...MainLinks
...SecondaryLinks
...AppDownloads
}
}
}
query GetFooterRef($locale: String!) {
all_footer(limit: 1, locale: $locale) {
items {
...MainLinksRef
...SecondaryLinksRef
system {
...System
}
}
}
}