feat(sw-187): Refactor footer output and fixed urls to include language

This commit is contained in:
Pontus Dreij
2024-09-09 13:59:36 +02:00
parent 093ea1a99a
commit ef33d082d8
15 changed files with 253 additions and 282 deletions

View File

@@ -1,28 +0,0 @@
fragment MainLinks on Footer {
main_links {
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

@@ -1,22 +0,0 @@
#import "../../Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../../Refs/MyPages/AccountPage.graphql"
#import "../../Refs/ContentPage/ContentPage.graphql"
fragment MainLinksRef on Footer {
__typename
main_links {
pageConnection {
edges {
node {
__typename
...LoyaltyPageRef
...ContentPageRef
...AccountPageRef
}
}
}
}
system {
...System
}
}

View File

@@ -1,24 +0,0 @@
#import "../../Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../../Refs/MyPages/AccountPage.graphql"
#import "../../Refs/ContentPage/ContentPage.graphql"
fragment SecondaryLinksRef on Footer {
__typename
secondary_links {
links {
pageConnection {
edges {
node {
__typename
...LoyaltyPageRef
...ContentPageRef
...AccountPageRef
}
}
}
}
}
system {
...System
}
}

View File

@@ -1,31 +0,0 @@
fragment SecondaryLinks on Footer {
secondary_links {
title
links {
open_in_new_tab
pageConnection {
edges {
node {
__typename
... on AccountPage {
title
url
}
... on LoyaltyPage {
title
url
}
... on ContentPage {
title
url
}
}
}
}
link {
href
title
}
}
}
}

View File

@@ -1,28 +0,0 @@
fragment TertiaryLinks on Footer {
tertiary_links {
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

@@ -1,21 +1,74 @@
#import "../Fragments/Footer/AppDownloads.graphql"
#import "../Fragments/Footer/MainLinks.graphql"
#import "../Fragments/Footer/SecondaryLinks.graphql"
#import "../Fragments/Footer/SocialMedia.graphql"
#import "../Fragments/Footer/TertiaryLinks.graphql"
#import "../Fragments/Footer/Refs/MainLinks.graphql"
#import "../Fragments/Footer/Refs/SecondaryLinks.graphql"
#import "../Fragments/Footer/Refs/TertiaryLinks.graphql"
#import "../Fragments/Refs/System.graphql"
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/HotelPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
#import "../Fragments/Refs/ContentPage/ContentPage.graphql"
#import "../Fragments/Refs/HotelPage/HotelPage.graphql"
#import "../Fragments/Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../Fragments/Refs/MyPages/AccountPage.graphql"
#import "../Fragments/Footer/AppDownloads.graphql"
#import "../Fragments/Footer/SocialMedia.graphql"
query GetFooter($locale: String!) {
all_footer(limit: 1, locale: $locale) {
items {
...MainLinks
...SecondaryLinks
main_links {
open_in_new_tab
link {
href
title
}
pageConnection {
edges {
node {
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
}
}
secondary_links {
title
links {
open_in_new_tab
pageConnection {
edges {
node {
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
}
link {
href
title
}
}
}
tertiary_links {
open_in_new_tab
link {
href
title
}
pageConnection {
edges {
node {
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
}
}
...AppDownloads
...SocialMedia
...TertiaryLinks
}
}
}
@@ -23,9 +76,41 @@ query GetFooter($locale: String!) {
query GetFooterRef($locale: String!) {
all_footer(limit: 1, locale: $locale) {
items {
...MainLinksRef
...SecondaryLinksRef
...TertiaryLinksRef
main_links {
pageConnection {
edges {
node {
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}
secondary_links {
links {
pageConnection {
edges {
node {
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}
}
tertiary_links {
pageConnection {
edges {
node {
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}
system {
...System
}