The page a route node is, or null for a node the table leaves out (a handler, another framework's route).
(node: Node)
| 127 | |
| 128 | /** The page a route node is, or null for a node the table leaves out (a handler, another framework's route). */ |
| 129 | function 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 | |
| 134 | export function nextRouteTable(context: ResolutionContext): NextTable { |
| 135 | const all = context.getNodesByKind('route'); |
no test coverage detected