chore: clean up typings
This commit is contained in:
@@ -1,16 +1,30 @@
|
||||
import { Lang } from "@/constants/languages"
|
||||
import { DynamicContent } from "@/types/requests/myPages/accountpage"
|
||||
import {
|
||||
AccountPageContentItem,
|
||||
DynamicContentComponents,
|
||||
} from "@/types/requests/myPages/accountpage"
|
||||
import { User } from "@/types/user"
|
||||
|
||||
export type AccountPageContentProps = {
|
||||
content: DynamicContent
|
||||
lang: Lang
|
||||
component: DynamicContentComponents
|
||||
props: {
|
||||
title?: string
|
||||
subtitle?: string
|
||||
link?: { href: string; text: string }
|
||||
lang: Lang
|
||||
}
|
||||
user: User
|
||||
}
|
||||
|
||||
export type AccountPageComponentProps = {
|
||||
lang: Lang
|
||||
title: string
|
||||
title?: string
|
||||
subtitle?: string
|
||||
link?: { href: string; text: string }
|
||||
}
|
||||
|
||||
export type ContentProps = {
|
||||
user: User
|
||||
lang: Lang
|
||||
content: AccountPageContentItem[]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { User } from "@/types/user"
|
||||
|
||||
export type OverviewProps = {
|
||||
title: string
|
||||
title?: string
|
||||
user: User
|
||||
}
|
||||
|
||||
@@ -19,33 +19,33 @@ export enum ContentEntries {
|
||||
AccountPageContentTextContent = "AccountPageContentTextContent",
|
||||
}
|
||||
|
||||
export type Shortcut = {
|
||||
type Shortcut = {
|
||||
text: string
|
||||
linkConnection: Edges<PageLink>
|
||||
}
|
||||
|
||||
export type DynamicContent = {
|
||||
type DynamicContent = {
|
||||
component: DynamicContentComponents
|
||||
title: string
|
||||
preamble: string
|
||||
title?: string
|
||||
preamble?: string
|
||||
link: { linkConnection: Edges<PageLink>; link_text: string }
|
||||
}
|
||||
|
||||
export type AccountPageDynamicContent = Typename<
|
||||
type AccountPageDynamicContent = Typename<
|
||||
{ dynamic_content: DynamicContent },
|
||||
ContentEntries.AccountPageContentDynamicContent
|
||||
>
|
||||
|
||||
export type AccountPageContentShortcuts = Typename<
|
||||
type AccountPageContentShortcuts = Typename<
|
||||
{
|
||||
title: string
|
||||
preamble: string
|
||||
title?: string
|
||||
preamble?: string
|
||||
shortcuts: { shortcuts: Shortcut[] }
|
||||
},
|
||||
ContentEntries.AccountPageContentShortcuts
|
||||
>
|
||||
|
||||
export type AccountPageContentTextContent = Typename<
|
||||
type AccountPageContentTextContent = Typename<
|
||||
{
|
||||
text_content: {
|
||||
content: {
|
||||
@@ -61,7 +61,7 @@ export type AccountPageContentItem =
|
||||
| AccountPageContentShortcuts
|
||||
| AccountPageContentTextContent
|
||||
|
||||
export type AccountPage = {
|
||||
type AccountPage = {
|
||||
url: string
|
||||
title: string
|
||||
content: AccountPageContentItem[]
|
||||
|
||||
Reference in New Issue
Block a user