Skip to content

parseSidebarSectionCountsCookie

parseSidebarSectionCountsCookie(props): SidebarSectionCounts

Defined in: packages/core/src/sidebarSectionCountsCookie.ts:40

Parses the sidebarCounts field off the consolidated vex-admin cookie’s value. Tolerant of a missing, malformed, or stale-shaped cookie, the same contract parseAdminCookie itself already establishes — degrades to {} (every section falls back to the config’s own declared item count, AdminSidebarSkeleton’s job, not this function’s) rather than throwing.

string | undefined

The raw vex-admin cookie value, or undefined when unset.

SidebarSectionCounts

The parsed per-section count map, with any unknown/malformed section dropped.