From 02bda0daf842db972d768e79f8811c57e6cad7c3 Mon Sep 17 00:00:00 2001 From: Felipe Henrich Date: Fri, 31 Jan 2025 18:24:27 -0300 Subject: [PATCH] refactor: remove unused props --- front/src/views/Products/ProductsView.tsx | 4 +--- front/src/views/Products/components/ProductsTable.tsx | 10 ---------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/front/src/views/Products/ProductsView.tsx b/front/src/views/Products/ProductsView.tsx index 8703dfdb9..645bfce60 100644 --- a/front/src/views/Products/ProductsView.tsx +++ b/front/src/views/Products/ProductsView.tsx @@ -185,9 +185,7 @@ function Products() { onRefetch={refetchStandardProducts} productsQueryRef={standardProductsQueryRef} columns={availableColumns} - selectedRowsArePending={false} // TODO: what's this? - // setSelectedBoxes={} // TODO: what's this? - // onBoxRowClick={} + selectedRowsArePending={false} // true on disable product /> ); diff --git a/front/src/views/Products/components/ProductsTable.tsx b/front/src/views/Products/components/ProductsTable.tsx index 1e0690106..9349af722 100644 --- a/front/src/views/Products/components/ProductsTable.tsx +++ b/front/src/views/Products/components/ProductsTable.tsx @@ -48,8 +48,6 @@ type ProductTableProps = { onRefetch: (variables?: StandardProductsforProductsViewVariables) => void; productsQueryRef: QueryRef; columns: Column[]; - // onBoxRowClick?: (labelIdentified: string) => void; - setSelectedBoxes?: (rows: Row[]) => void; selectedRowsArePending: boolean; }; @@ -58,8 +56,6 @@ function ProductsTable({ onRefetch, productsQueryRef, columns, - // onBoxRowClick, - // setSelectedBoxes, selectedRowsArePending, }: ProductTableProps) { const { baseId } = useBaseIdParam(); @@ -91,7 +87,6 @@ function ProductsTable({ pageOptions, nextPage, previousPage, - // selectedFlatRows, } = useTable( { columns, @@ -130,10 +125,6 @@ function ProductsTable({ // }, ); - // useEffect(() => { - // setSelectedBoxes(selectedFlatRows.map((row) => row)); - // }, [selectedFlatRows, setSelectedBoxes]); - useEffect(() => { // refetch const newStateFilter = filters.find((filter) => filter.id === "state"); @@ -211,7 +202,6 @@ function ProductsTable({ } cursor="pointer" {...row.getRowProps()} - // onClick={() => onBoxRowClick(row.original.labelIdentifier)} key={row.original.id} > {row.cells.map((cell) => (