aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/hooks/use-pagination/use-pagination.ts
Commit message (Collapse)AuthorAgeFilesLines
* refactor(pages): refine Blog pagesArmand Philippot2023-12-041-4/+4
| | | | | | | | | | * replace usePostsList with useArticlesList to keep names coherent * remove useIsMounted hook * rewrite useRedirection hook * add redirect in getStaticProps to avoid unecessary fetching * move Pagination component in a noscript tag * use hooks to refresh thematics and topics lists * complete Cypress tests
* refactor(services, types): reorganize GraphQL fetchers and data typesArmand Philippot2023-11-271-7/+10
| | | | | | | | | | | | The Typescript mapped types was useful for autocompletion in fetchers but their are harder to maintain. I think it's better to keep each query close to its fetcher to have a better understanding of the fetched data. So I: * colocate queries with their own fetcher * colocate mutations with their own mutator * remove Typescript mapped types for queries and mutations * move data convertors inside graphql services * rename most of data types and fetchers
* refactor(hooks): rewrite usePagination hookArmand Philippot2023-11-131-0/+136
* replace `isLoadingInitialData` with `isLoading` & `isRefreshing` * rename `fallbackData` prop to `fallback` * replace `setSize` return with a `loadMore` callback * add tests