feat: add my benefits page

This commit is contained in:
Christel Westerberg
2024-04-08 09:27:51 +02:00
parent 0a3292a354
commit 8ca4767806
10 changed files with 180 additions and 2 deletions

View File

@@ -0,0 +1,62 @@
#import "../Fragments/Image.graphql"
fragment Preamble on MyPage {
preamble {
text {
json
embedded_itemsConnection(limit: 30) {
edges {
node {
__typename
...Image
}
}
}
}
}
}
fragment Breadcrumbs on MyPage {
breadcrumbs {
parents {
href
title
}
title
}
}
query GetBenefitsPage($locale: String!, $url: String!) {
all_my_page(where: { code_defined_route: $url, locale: $locale }) {
items {
blocks {
... on MyPageBlocksShortcuts {
__typename
shortcuts {
external_link {
href
title
}
}
}
... on MyPageBlocksNextLevelBlock {
__typename
next_level_block {
subtitle
title
}
}
... on MyPageBlocksPersonalBenefitsBlock {
__typename
personal_benefits_block {
is_visible
}
}
}
...Breadcrumbs
...Preamble
title
url
}
total
}
}

View File

@@ -3,9 +3,9 @@
#import "../Fragments/Blocks/List.graphql"
#import "../Fragments/Blocks/Puff.graphql"
#import "../Fragments/Blocks/Text.graphql"
#import "../Fragments/Breadcrumbs.graphql"
#import "../Fragments/CurrentBlocksPage/Breadcrumbs.graphql"
#import "../Fragments/Hero.graphql"
#import "../Fragments/Preamble.graphql"
#import "../Fragments/CurrentBlocksPage/Preamble.graphql"
query GetCurrentBlockPage($locale: String!, $url: String!) {
all_current_blocks_page(limit: 1, locale: $locale, where: { url: $url }) {