diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-15 17:08:00 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-15 17:08:00 +0100 |
| commit | 516f8256a4f72c7a01752d9aa4e035276fb08b51 (patch) | |
| tree | 791a83b4f6cc2963246752a8ae6efbac62ebcd85 /src/services | |
| parent | 0fa8ae55c52852c34c9143a6ec43c954c6404df1 (diff) | |
chore: add pagination (load more) to blog page
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/graphql/blog.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/services/graphql/blog.ts b/src/services/graphql/blog.ts index 266af87..1cfdd44 100644 --- a/src/services/graphql/blog.ts +++ b/src/services/graphql/blog.ts @@ -85,10 +85,10 @@ export const fetchPublishedPosts: fetchPostsListReturn = async ( } }; -export const getPublishedPosts: getPostsListReturn = async ( +export const getPublishedPosts: getPostsListReturn = async ({ first = 10, - after = '' -) => { + after = '', +}) => { const rawPostsList = await fetchPublishedPosts(first, after); const postsList: ArticlePreview[] = rawPostsList.posts.edges.map((post) => { const { |
