fix: add navigation subitems

This commit is contained in:
Arvid Norlin
2024-04-08 10:49:31 +02:00
parent e5876e4e14
commit de025fc889
4 changed files with 78 additions and 28 deletions

View File

@@ -1,14 +1,24 @@
import type { AllRequestResponse } from "../utils/all"
import { Edges } from "../utils/edges"
export type MenuItem = { uid: string; title: string; linkText: string }
export type MenuItem = {
uid: string
title: string
linkText: string
subItems: MenuItem[] | null
url?: string
}
export type SidebarProps = { menuItems: MenuItem[] }
export type PageLink = { uid: string; title: string }
export type PageLink = { uid: string; title: string; url?: string }
export type NavigationItem = {
item: { pageConnection: Edges<PageLink>; link_text: string }
item: {
pageConnection: Edges<PageLink>
link_text: string
sub_items: NavigationItem[] | null
}
}
export type NavigationMyPages = { items: NavigationItem[] }