feat(WEB-170): edit profile view

This commit is contained in:
Simon Emanuelsson
2024-04-11 18:51:38 +02:00
parent 82e4d40203
commit 9396b2c3d5
114 changed files with 3642 additions and 2171 deletions

View File

@@ -1,6 +1,7 @@
import type { Lang } from "@/constants/languages"
import type { AllRequestResponse } from "../utils/all"
import { Edges } from "../utils/edges"
import { Typename } from "../utils/typename"
import type { Edges } from "../utils/edges"
import type { TypenameInterface } from "../utils/typename"
export enum PageLinkEnum {
AccountPage = "AccountPage",
@@ -9,43 +10,44 @@ export enum PageLinkEnum {
}
export type MenuItem = {
uid: string
lang: Lang
linkText: string
subItems: MenuItem[] | null
uid: string
url: string
}
export type SidebarProps = { menuItems: MenuItem[] }
export type SidebarProps = {
lang: Lang
}
export type AccountPageLink = Typename<
{
interface NavigationLink {
system: {
locale: Lang
uid: string
title: string
}
title: string
}
export interface AccountPageLink
extends NavigationLink,
TypenameInterface<PageLinkEnum.AccountPage> {
url: string
}
export interface LoyaltyPageLink
extends NavigationLink,
TypenameInterface<PageLinkEnum.LoyaltyPage> {
url: string
}
export interface ContentPageLink
extends NavigationLink,
TypenameInterface<PageLinkEnum.ContentPage> {
web: {
url: string
system: { uid: string }
},
PageLinkEnum.AccountPage
>
export type LoyaltyPageLink = Typename<
{
uid: string
title: string
url: string
system: { uid: string }
},
PageLinkEnum.LoyaltyPage
>
export type ContentPageLink = Typename<
{
uid: string
title: string
web: { url: string }
system: { uid: string }
},
PageLinkEnum.ContentPage
>
}
}
export type PageLink = ContentPageLink | AccountPageLink | LoyaltyPageLink