(entry: HistoryEntry, height: number)
| 93 | // Next resets the scroll to the top when the destination commits, before any |
| 94 | // effect runs. |
| 95 | const commit = (entry: HistoryEntry, height: number) => { |
| 96 | mockRouter.asPath = entry.path; |
| 97 | setScrollY(0); |
| 98 | setPageHeight(height); |
| 99 | rerenderHook(); |
| 100 | }; |
| 101 | |
| 102 | // A link: Next announces the change before it pushes the new entry. |
| 103 | const navigate = (path: string, height: number): HistoryEntry => { |
no test coverage detected