SkyeYoung commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r837016920



##########
File path: web/src/hooks/usePagination.ts
##########
@@ -30,5 +33,14 @@ export default function usePagination() {
     history.replace(`${location.pathname}?page=${page}&pageSize=${pageSize}`);
   };
 
-  return { paginationConfig, savePageList };
+  const checkPageList = (ref: MutableRefObject<ActionType | undefined>) => {
+    const { current, pageSize, total } = ref.current!.pageInfo as PageInfo;

Review comment:
       ```suggestion
       const { current, pageSize, total } = ref.current?.pageInfo as PageInfo;
   ```
   
   `!.` will just remove `undefined` and `null` from the `current`'s type. 
Maybe `?.` is better?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to