fix: add intents for buttons

This commit is contained in:
Christel Westerberg
2024-04-11 16:47:35 +02:00
parent 85b83bc58b
commit a99b2d3f08
17 changed files with 171 additions and 130 deletions

View File

@@ -1,56 +0,0 @@
import type { AllRequestResponse } from "./utils/all"
import type { MyPageBlocksEnum, Typename } from "./utils/typename"
type Shortcuts = {
title: string
subtitle: string
external_link: {
href: string
title: string
}
}
type PersonalBenefitsBlock = {
is_visible: boolean
}
type NextLevelBlock = {
title: string
subtitle: string
}
export type Blocks =
| Typename<NextLevelBlock, MyPageBlocksEnum.MyPageBlocksNextLevelBlock>
| Typename<
PersonalBenefitsBlock,
MyPageBlocksEnum.MyPageBlocksPersonalBenefitsBlock
>
| Typename<Shortcuts, MyPageBlocksEnum.MyPageBlocksShortcuts>
export type Breadcrumb = {
href: string
title: string
}
export type Breadcrumbs = {
parents: Breadcrumb[]
title: string
}
export type BenefitPage = {
content: Blocks[]
breadcrumbs: Breadcrumbs
code_defined_route: string
preamble: string
system: {
created_at: string
uid: string
updated_at: string
}
title: string
url: string
}
export type GetBenefitsPageData = {
all_my_page: AllRequestResponse<BenefitPage>
}

View File

@@ -16,10 +16,3 @@ export type BlocksTypename = keyof typeof BlocksTypenameEnum
export type Typename<T, K> = T & {
__typename: K
}
export enum MyPageBlocksEnum {
MyPageBlocksNextLevelBlock = "MyPageBlocksNextLevelBlock",
MyPageBlocksPersonalBenefitsBlock = "MyPageBlocksPersonalBenefitsBlock",
MyPageBlocksShortcuts = "MyPageBlocksShortcuts",
}
export type MyPageBlocksTypename = keyof typeof MyPageBlocksEnum