()
| 76 | }; |
| 77 | |
| 78 | export const usePatchyContext = (): PatchyContext => { |
| 79 | const router = useRouter(); |
| 80 | const client = useQueryClient(); |
| 81 | const readingPost = getPatchyReadingPost(); |
| 82 | return getPatchyContext({ |
| 83 | path: router?.asPath ?? '/', |
| 84 | query: router?.query ?? {}, |
| 85 | post: readingPost && getPatchyCurrentPost(client, readingPost), |
| 86 | }); |
| 87 | }; |
| 88 | |
| 89 | // What you can ask Patchy for, in his corner of the Streak panel. It depends |
| 90 | // on where you are: a post, your feed, a tag, a source, your bookmarks or a |
no test coverage detected