From 70fee57bde99164564b10b940111d49ed52f76dc Mon Sep 17 00:00:00 2001 From: Andcool-Systems Date: Fri, 23 Aug 2024 02:23:51 +0300 Subject: [PATCH] fixed paginator --- src/app/modules/components/paginator.module.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/modules/components/paginator.module.tsx b/src/app/modules/components/paginator.module.tsx index bc988a9..65b6b62 100644 --- a/src/app/modules/components/paginator.module.tsx +++ b/src/app/modules/components/paginator.module.tsx @@ -52,7 +52,7 @@ export const Paginator = ({ total_count, take, onChange }: PaginatorProps) => { return _display ?
{_pages.length > 0 && <> - _setPage(0)} src="/static/icons/arrow.svg" /> + _setPage(last => Math.max(0, last - 1))} src="/static/icons/arrow.svg" /> {_pages} _setPage(last => Math.min(last + 1, Math.ceil(_totalCount / _take) - 1))} src="/static/icons/arrow.svg" />