Skip to content

Commit 2c59bb0

Browse files
added DEFAULT_ITEMS_PER_PAGE.
1 parent 9358227 commit 2c59bb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ui/layouts/common/Table/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface TableProps {
3535
}
3636

3737
const ITEMS_PER_PAGE = parseInt(process.env.REACT_APP_ITEMS_PER_PAGE as string);
38+
const DEFAULT_ITEMS_PER_PAGE = 10;
3839

3940
export const Table: React.FC<TableProps> = ({
4041
headerCols,
@@ -50,7 +51,7 @@ export const Table: React.FC<TableProps> = ({
5051

5152
const { itemsForPage, pages, totalOfPages } = getPaginationData({
5253
pageIndex,
53-
itemsPerPage: ITEMS_PER_PAGE,
54+
itemsPerPage: ITEMS_PER_PAGE ? ITEMS_PER_PAGE : DEFAULT_ITEMS_PER_PAGE,
5455
items: tableRows,
5556
});
5657

0 commit comments

Comments
 (0)