MCPcopy Create free account
hub / github.com/effector/effector / createMobileNavigation

Function createMobileNavigation

documentation/src/navigation.ts:306–322  ·  view source on GitHub ↗
(nav: LMobileNavItem[])

Source from the content-addressed store, hash-verified

304}
305
306function createMobileNavigation(nav: LMobileNavItem[]) {
307 return nav.map((item): LMobileNavItem => {
308 if ("items" in item) {
309 return {
310 ...item,
311 id: nanoid(6),
312 items: createMobileNavigation(item.items),
313 active: false,
314 };
315 }
316 return {
317 ...item,
318 id: nanoid(6),
319 active: false,
320 };
321 });
322}
323
324export function markActiveNavigation(link: string, navigation: LMobileNavItem[]) {
325 // We want to mutate the array and items inside.

Callers 1

navigation.tsFile · 0.85

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…