(path: string)
| 32 | } |
| 33 | |
| 34 | const getTimestampPageData = async (path: string): Promise<PageInfo> => { |
| 35 | const fullPath = `/timestamp/key/${encodeURIComponent(path)}` |
| 36 | const $ = await next.render$(fullPath) |
| 37 | const dataStr = $('#page-info').text() |
| 38 | if (!dataStr) { |
| 39 | throw new Error(`No page data found for path '${fullPath}'`) |
| 40 | } |
| 41 | return JSON.parse(dataStr) as PageInfo |
| 42 | } |
| 43 | |
| 44 | const getInitialTimestampPageData = async (path: string) => { |
| 45 | // FIXME: this seems like a bug in PPR -- |
no test coverage detected