Skip to content

Commit 9370495

Browse files
committed
fix: move to constants
1 parent bbcd326 commit 9370495

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/containers/Operations/useOperationsInfiniteQuery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22

33
import {throttle} from 'lodash';
44

5-
import {operationsApi} from '../../store/reducers/operations';
5+
import {DEFAULT_PAGE_SIZE, operationsApi} from '../../store/reducers/operations';
66
import type {OperationKind} from '../../types/api/operations';
77

88
interface UseOperationsInfiniteQueryProps {
@@ -18,7 +18,7 @@ const DEFAULT_SCROLL_MARGIN = 100;
1818
export function useOperationsInfiniteQuery({
1919
database,
2020
kind,
21-
pageSize = 20,
21+
pageSize = DEFAULT_PAGE_SIZE,
2222
searchValue,
2323
scrollContainerRef,
2424
}: UseOperationsInfiniteQueryProps) {

src/store/reducers/operations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {
88

99
import {api} from './api';
1010

11-
const DEFAULT_PAGE_SIZE = 20;
11+
export const DEFAULT_PAGE_SIZE = 20;
1212

1313
// Validate and normalize the response to ensure it has proper structure
1414
function validateOperationListResponse(data: TOperationList): TOperationList {

0 commit comments

Comments
 (0)