getPagerForDoc() — supabase Function Reference
Architecture documentation for the getPagerForDoc() function in pager.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 90829d6e_59b6_b456_5c0b_4dea6bd53327["getPagerForDoc()"] 27db9859_d131_31d9_8bd1_3b94f5b0d771["DocsPager()"] 27db9859_d131_31d9_8bd1_3b94f5b0d771 -->|calls| 90829d6e_59b6_b456_5c0b_4dea6bd53327 c4bcb88a_06c2_d08c_d1fa_1c2a149ee23e["flatten()"] 90829d6e_59b6_b456_5c0b_4dea6bd53327 -->|calls| c4bcb88a_06c2_d08c_d1fa_1c2a149ee23e style 90829d6e_59b6_b456_5c0b_4dea6bd53327 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/design-system/components/pager.tsx lines 56–65
export function getPagerForDoc(doc: Doc) {
const flattenedLinks = [null, ...flatten(docsConfig.sidebarNav), 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
Calls
Called By
Source
Frequently Asked Questions
What does getPagerForDoc() do?
getPagerForDoc() is a function in the supabase codebase.
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