File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { useSWRRefresh } from 'utils/swr'
11
11
export type OrderBy = 'views' | 'hot' | 'id'
12
12
13
13
export interface UseOperationsParams {
14
+ limit ?: number
14
15
orderBy ?: OrderBy
15
16
descending ?: boolean
16
17
keyword ?: string
@@ -24,6 +25,7 @@ export interface UseOperationsParams {
24
25
}
25
26
26
27
export function useOperations ( {
28
+ limit = 50 ,
27
29
orderBy,
28
30
descending = true ,
29
31
keyword,
@@ -71,7 +73,7 @@ export function useOperations({
71
73
return [
72
74
'operations' ,
73
75
{
74
- limit : 50 ,
76
+ limit,
75
77
page : pageIndex + 1 ,
76
78
document : keyword ,
77
79
levelKeyword,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export const Operations: ComponentType = withSuspensable(() => {
28
28
const [ queryParams , setQueryParams ] = useState <
29
29
Omit < UseOperationsParams , 'operator' >
30
30
> ( {
31
+ limit : 10 ,
31
32
orderBy : 'hot' ,
32
33
} )
33
34
const [ selectedOperators , setSelectedOperators ] = useAtom (
You can’t perform that action at this time.
0 commit comments