chore: organize types

This commit is contained in:
Arvid Norlin
2024-05-02 10:52:05 +02:00
parent ec37ee0f1f
commit 58d2963d6a
6 changed files with 25 additions and 87 deletions

View File

@@ -2,11 +2,11 @@ import { z } from "zod"
import { Lang } from "@/constants/languages"
import { Embeds } from "@/types/requests/embeds"
import {
ContentEntries,
DynamicContentComponents,
} from "@/types/requests/myPages/accountpage"
} from "@/types/components/myPages/myPage/enums"
import { Embeds } from "@/types/requests/embeds"
import { Edges } from "@/types/requests/utils/edges"
import { RTEDocument } from "@/types/rte/node"
@@ -97,7 +97,10 @@ export type RteTextContent = Omit<TextContentRaw, "text_content"> & {
}
}
type AccountPageContentItem = DynamicContentRaw | ShortcutsRaw | RteTextContent
export type AccountPageContentItem =
| DynamicContentRaw
| ShortcutsRaw
| RteTextContent
const accountPageContentItem = z.discriminatedUnion("__typename", [
accountPageShortcuts,