(anchor: HTMLAnchorElement)
| 52 | } |
| 53 | const fetched = new Set<string>(); |
| 54 | const prefetch = (anchor: HTMLAnchorElement) => { |
| 55 | const href = pathOf(anchor); |
| 56 | if (fetched.has(href)) { |
| 57 | return; |
| 58 | } |
| 59 | fetched.add(href); |
| 60 | router.prefetch(href).catch(() => undefined); |
| 61 | }; |
| 62 | const onPress = (event: Event) => { |
| 63 | const anchor = pageLink(event.target); |
| 64 | if (anchor) { |
no test coverage detected