fix season payments
This commit is contained in:
parent
c61f857853
commit
19e593dbd8
@ -134,15 +134,13 @@ const useColumnsProps = columns =>
|
||||
|
||||
const useSplit = (split, rows) => {
|
||||
return useMemo(() => {
|
||||
if (!split) {
|
||||
if (!split || !rows?.length) {
|
||||
return {
|
||||
partsNumber: 1,
|
||||
};
|
||||
}
|
||||
const { rowsNumber } = split;
|
||||
if (rows?.length) {
|
||||
return { partsNumber: Math.ceil(rows?.length / rowsNumber), rowsNumber };
|
||||
}
|
||||
return { partsNumber: Math.ceil(rows?.length / rowsNumber), rowsNumber };
|
||||
}, [rows?.length]);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user