chore: run prettier --write .

This commit is contained in:
Arvid Norlin
2024-02-19 14:24:30 +01:00
parent 7d51124b9f
commit 8a8c463452
71 changed files with 846 additions and 444 deletions
+11 -9
View File
@@ -6,22 +6,24 @@ import { RTETypeEnum } from "@/types/rte/enums"
import type { EmbedByUid } from "@/types/components/jsontohtml"
import type { Node } from "@/types/requests/utils/edges"
import type { RenderOptions } from "@/types/rte/option"
import type { RTENode, RTETextNode, RTERenderOptionComponent } from "@/types/rte/node"
import type {
RTENode,
RTETextNode,
RTERenderOptionComponent,
} from "@/types/rte/node"
import type { Embeds } from "@/types/requests/embeds"
export function groupEmbedsByUid(embedsArray: Node<Embeds>[]) {
const embedsByUid = embedsArray
.reduce<EmbedByUid>((acc, embed) => {
if (embed.node.system.uid) {
acc[embed.node.system.uid] = embed
}
return acc
}, {})
const embedsByUid = embedsArray.reduce<EmbedByUid>((acc, embed) => {
if (embed.node.system.uid) {
acc[embed.node.system.uid] = embed
}
return acc
}, {})
return embedsByUid
}
export function nodeChildrenToHtml(
nodes: RTENode[],
embeds: EmbedByUid,