aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/blog/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/blog/index.tsx')
-rw-r--r--src/pages/blog/index.tsx15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx
index a638bd4..095af72 100644
--- a/src/pages/blog/index.tsx
+++ b/src/pages/blog/index.tsx
@@ -16,15 +16,12 @@ const Blog: NextPageWithLayout<BlogPageProps> = ({ fallback }) => {
const getKey = (pageIndex: number, previousData: PostsListData) => {
if (previousData && !previousData.posts) return null;
- const args =
- pageIndex === 0
- ? { first: config.postsPerPage }
- : {
- first: config.postsPerPage,
- after: previousData.pageInfo.endCursor,
- };
-
- return args;
+ return pageIndex === 0
+ ? { first: config.postsPerPage }
+ : {
+ first: config.postsPerPage,
+ after: previousData.pageInfo.endCursor,
+ };
};
const { data, error, size, setSize } = useSWRInfinite(