From 6a9c68a8489075b632c47dab25ba0b05400c5b35 Mon Sep 17 00:00:00 2001 From: Ron Lavi <1ronlavi@gmail.com> Date: Wed, 3 Jan 2024 08:24:29 +0000 Subject: [PATCH] lint issue --- webpack/helpers/pageParamsHelper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webpack/helpers/pageParamsHelper.js b/webpack/helpers/pageParamsHelper.js index af48968b..28dc6fec 100644 --- a/webpack/helpers/pageParamsHelper.js +++ b/webpack/helpers/pageParamsHelper.js @@ -31,11 +31,11 @@ export const useCurrentPagination = history => { */ export const pageToVars = ({ page, per_page }, totalCount = 0) => { totalCount = totalCount || per_page; - return ({ + return { first: Math.min(page * per_page, totalCount), last: Math.min(per_page, totalCount - (page - 1) * per_page), - }); -} + }; +}; export const useParamsToVars = (history, totalCount) => pageToVars(useCurrentPagination(history), totalCount);