Skip to content

Commit a225ae7

Browse files
committed
fix: nanofix
1 parent f8f1ba4 commit a225ae7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/containers/Storage/PaginatedStorage.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {PaginatedStorageGroups} from './PaginatedStorageGroups';
22
import {PaginatedStorageNodes} from './PaginatedStorageNodes';
33
import type {StorageViewContext} from './types';
44
import {useStorageQueryParams} from './useStorageQueryParams';
5+
import {getStorageGroupsInitialEntitiesCount, getStorageNodesInitialEntitiesCount} from './utils';
56

67
export interface PaginatedStorageProps {
78
database?: string;
@@ -16,8 +17,6 @@ export interface PaginatedStorageProps {
1617
initialEntitiesCount?: number;
1718
}
1819

19-
const DEFAULT_ENTITIES_COUNT = 10;
20-
2120
export const PaginatedStorage = (props: PaginatedStorageProps) => {
2221
const {storageType} = useStorageQueryParams();
2322

@@ -26,15 +25,15 @@ export const PaginatedStorage = (props: PaginatedStorageProps) => {
2625
if (isNodes) {
2726
return (
2827
<PaginatedStorageNodes
29-
initialEntitiesCount={props.viewContext.nodeId ? 1 : DEFAULT_ENTITIES_COUNT}
28+
initialEntitiesCount={getStorageNodesInitialEntitiesCount(props.viewContext)}
3029
{...props}
3130
/>
3231
);
3332
}
3433

3534
return (
3635
<PaginatedStorageGroups
37-
initialEntitiesCount={props.viewContext.groupId ? 1 : DEFAULT_ENTITIES_COUNT}
36+
initialEntitiesCount={getStorageGroupsInitialEntitiesCount(props.viewContext)}
3837
{...props}
3938
/>
4039
);

0 commit comments

Comments
 (0)