getPagerForDoc() — ui Function Reference
Architecture documentation for the getPagerForDoc() function in pager.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 001e0f6b_7835_dbc1_a974_705554ac3489["getPagerForDoc()"] 213561a5_18fd_dd2d_4a77_5d95a3395c34["pager.tsx"] 001e0f6b_7835_dbc1_a974_705554ac3489 -->|defined in| 213561a5_18fd_dd2d_4a77_5d95a3395c34 9429d3ec_8df8_0c96_68db_eaa7bf76b5a6["DocsPager()"] 9429d3ec_8df8_0c96_68db_eaa7bf76b5a6 -->|calls| 001e0f6b_7835_dbc1_a974_705554ac3489 d2d5ade5_e67f_aa8e_0485_fe4a0565ce9b["flatten()"] 001e0f6b_7835_dbc1_a974_705554ac3489 -->|calls| d2d5ade5_e67f_aa8e_0485_fe4a0565ce9b style 001e0f6b_7835_dbc1_a974_705554ac3489 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
deprecated/www/components/pager.tsx lines 42–59
export function getPagerForDoc(doc: Doc) {
const nav = doc.slug.startsWith("/docs/charts")
? docsConfig.chartsNav
: docsConfig.sidebarNav
const flattenedLinks = [null, ...flatten(nav), null]
const activeIndex = flattenedLinks.findIndex(
(link) => doc.slug === link?.href
)
const prev = activeIndex !== 0 ? flattenedLinks[activeIndex - 1] : null
const next =
activeIndex !== flattenedLinks.length - 1
? flattenedLinks[activeIndex + 1]
: null
return {
prev,
next,
}
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does getPagerForDoc() do?
getPagerForDoc() is a function in the ui codebase, defined in deprecated/www/components/pager.tsx.
Where is getPagerForDoc() defined?
getPagerForDoc() is defined in deprecated/www/components/pager.tsx at line 42.
What does getPagerForDoc() call?
getPagerForDoc() calls 1 function(s): flatten.
What calls getPagerForDoc()?
getPagerForDoc() is called by 1 function(s): DocsPager.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free