perf: auto refresh split data
This commit is contained in:
@@ -41,10 +41,6 @@ export const usePagination = <T = any,>({
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
mutate(1);
|
||||
}, []);
|
||||
|
||||
const Pagination = useCallback(() => {
|
||||
return (
|
||||
<Flex alignItems={'center'} justifyContent={'end'}>
|
||||
@@ -93,6 +89,10 @@ export const usePagination = <T = any,>({
|
||||
);
|
||||
}, [maxPage, mutate, pageNum]);
|
||||
|
||||
useEffect(() => {
|
||||
mutate(1);
|
||||
}, [mutate]);
|
||||
|
||||
return {
|
||||
pageNum,
|
||||
pageSize,
|
||||
|
||||
Reference in New Issue
Block a user