(cursor: string | undefined, direction: Direction)
| 62 | } |
| 63 | |
| 64 | function useCursorPath(cursor: string | undefined, direction: Direction) { |
| 65 | const location = useLocation(); |
| 66 | |
| 67 | if (!cursor) { |
| 68 | return undefined; |
| 69 | } |
| 70 | |
| 71 | const search = new URLSearchParams(location.search); |
| 72 | search.set("cursor", cursor); |
| 73 | search.set("direction", direction); |
| 74 | return location.pathname + "?" + search.toString(); |
| 75 | } |
no test coverage detected
searching dependent graphs…