feat: useMenuItems

This commit is contained in:
2026-03-27 08:18:18 -04:00
parent 5013935e84
commit 31ac7b8b4d
6 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
// Helper: Extracts nodes from a GraphQL connection object, returning an empty array if nodes are absent.
export function extractNodes<T>(connection: { nodes?: T[] } | null | undefined): T[] {
return connection?.nodes ?? [];
}