diff --git a/src/features/plans/ui/PalanTable.tsx b/src/features/plans/ui/PalanTable.tsx index fec3443..c713604 100644 --- a/src/features/plans/ui/PalanTable.tsx +++ b/src/features/plans/ui/PalanTable.tsx @@ -25,7 +25,8 @@ interface Props { selectedProducts: number[]; setSelectedProducts: Dispatch>; handleBulkDelete: () => void; - totalCount?: number; + totalCount: number; + count: number; handleSelectAllPages: () => void; isAllPagesSelected: boolean; } @@ -41,7 +42,7 @@ const ProductTable = ({ selectedProducts, setSelectedProducts, handleBulkDelete, - totalCount = 0, + totalCount, handleSelectAllPages, isAllPagesSelected, }: Props) => { @@ -96,9 +97,7 @@ const ProductTable = ({
- {isAllPagesSelected - ? `Barcha ${totalCount} ta mahsulot tanlandi` - : `${selectedProducts.length} ta mahsulot tanlandi`} + {`${selectedProducts.length} ta mahsulot tanlandi`}
{!isAllPagesSelected && totalCount > products.length && ( diff --git a/src/features/plans/ui/ProductList.tsx b/src/features/plans/ui/ProductList.tsx index 0a33573..64b1a70 100644 --- a/src/features/plans/ui/ProductList.tsx +++ b/src/features/plans/ui/ProductList.tsx @@ -41,8 +41,6 @@ const ProductList = () => { setPlanDelete(product); }; - console.log(selectedProducts); - const handleSelectAllPages = async () => { try { if (!data?.total) return; @@ -100,6 +98,7 @@ const ProductList = () => {