feat: add initial RTE rendering to AccountPage

This commit is contained in:
Arvid Norlin
2024-04-19 15:54:13 +02:00
parent 0dd8998ff8
commit 3d5f0ebb2c
4 changed files with 35 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ import { AllRequestResponse } from "../utils/all"
import type { Typename } from "../utils/typename"
import type { Edges } from "../utils/edges"
import { PageLink } from "../utils/pageLink"
import { RTEDocument } from "@/types/rte/node"
export enum DynamicContentComponents {
membership_overview = "membership_overview",
@@ -15,6 +16,7 @@ export enum DynamicContentComponents {
export enum ContentEntries {
AccountPageContentDynamicContent = "AccountPageContentDynamicContent",
AccountPageContentShortcuts = "AccountPageContentShortcuts",
AccountPageContentTextContent = "AccountPageContentTextContent",
}
export type Shortcut = {
@@ -43,9 +45,21 @@ export type AccountPageContentShortcuts = Typename<
ContentEntries.AccountPageContentShortcuts
>
export type AccountPageContentTextContent = Typename<
{
text_content: {
content: {
json: RTEDocument
}
}
},
ContentEntries.AccountPageContentTextContent
>
export type AccountPageContentItem =
| AccountPageDynamicContent
| AccountPageContentShortcuts
| AccountPageContentTextContent
export type AccountPage = {
url: string