MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / tablePage

Function tablePage

src/resolution/frameworks/nextjs.ts:129–132  ·  view source on GitHub ↗

The page a route node is, or null for a node the table leaves out (a handler, another framework's route).

(node: Node)

Source from the content-addressed store, hash-verified

127
128/** The page a route node is, or null for a node the table leaves out (a handler, another framework's route). */
129function tablePage(node: Node): NextRouteFile | null {
130 const file = nextRouteForFile(node.filePath);
131 return file && file.kind === 'page' && file.path === node.name ? file : null;
132}
133
134export function nextRouteTable(context: ResolutionContext): NextTable {
135 const all = context.getNodesByKind('route');

Callers 2

nextRouteTableFunction · 0.85
nextjs.tsFile · 0.85

Calls 1

nextRouteForFileFunction · 0.85

Tested by

no test coverage detected