feat(WEB-304): remaning UI from design system primitives
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import type { GetNavigationMyPagesRefsData } from "@/types/requests/myPages/navigation"
|
||||
import type { Edges } from "@/types/requests/utils/edges"
|
||||
import type { NodeRefs } from "@/types/requests/utils/refs"
|
||||
import type { GetNavigationMyPagesRefsData } from "./output"
|
||||
|
||||
export function getConnections(refs: GetNavigationMyPagesRefsData) {
|
||||
const connections: Edges<NodeRefs>[] = []
|
||||
refs.all_navigation_my_pages.items.forEach((ref) => {
|
||||
ref.items.forEach(({ item }) => {
|
||||
connections.push(item.pageConnection)
|
||||
|
||||
item.sub_items.forEach(({ item: subItem }) => {
|
||||
connections.push(subItem.pageConnection)
|
||||
ref.menu_items.forEach((menuItem) => {
|
||||
menuItem.links.map((link) => {
|
||||
connections.push(link.page)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user