summaryrefslogtreecommitdiff
path: root/gui/src/logic/trill
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-10-06 10:13:39 +0700
committerpolwex <polwex@sortug.com>2025-10-06 10:13:39 +0700
commit8751ba26ebf7b7761b9e237f2bf3453623dd1018 (patch)
treedc37f12b3fd9b1a1e7a1b54a51c80697f37a04e8 /gui/src/logic/trill
parent6704650dcfccf609ccc203308df9004e0b511bb6 (diff)
added frontend WS connection for demonstration purposes
Diffstat (limited to 'gui/src/logic/trill')
-rw-r--r--gui/src/logic/trill/helpers.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/src/logic/trill/helpers.ts b/gui/src/logic/trill/helpers.ts
new file mode 100644
index 0000000..6b5a138
--- /dev/null
+++ b/gui/src/logic/trill/helpers.ts
@@ -0,0 +1,10 @@
+import type { FullNode, Poast } from "@/types/trill";
+
+export function toFlat(n: FullNode): Poast {
+ return {
+ ...n,
+ children: !n.children
+ ? []
+ : Object.keys(n.children).map((c) => n.children[c].id),
+ };
+}