Skip to content

Commit

Permalink
refactor: remove unused props
Browse files Browse the repository at this point in the history
  • Loading branch information
fhenrich33 committed Jan 31, 2025
1 parent fe0e843 commit 02bda0d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
4 changes: 1 addition & 3 deletions front/src/views/Products/ProductsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
/>
</>
);
Expand Down
10 changes: 0 additions & 10 deletions front/src/views/Products/components/ProductsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ type ProductTableProps = {
onRefetch: (variables?: StandardProductsforProductsViewVariables) => void;
productsQueryRef: QueryRef<StandardProductsforProductsViewQuery>;
columns: Column<ProductRow>[];
// onBoxRowClick?: (labelIdentified: string) => void;
setSelectedBoxes?: (rows: Row<ProductRow>[]) => void;
selectedRowsArePending: boolean;
};

Expand All @@ -58,8 +56,6 @@ function ProductsTable({
onRefetch,
productsQueryRef,
columns,
// onBoxRowClick,
// setSelectedBoxes,
selectedRowsArePending,
}: ProductTableProps) {
const { baseId } = useBaseIdParam();
Expand Down Expand Up @@ -91,7 +87,6 @@ function ProductsTable({
pageOptions,
nextPage,
previousPage,
// selectedFlatRows,
} = useTable(
{
columns,
Expand Down Expand Up @@ -130,10 +125,6 @@ function ProductsTable({
// },
);

// useEffect(() => {
// setSelectedBoxes(selectedFlatRows.map((row) => row));
// }, [selectedFlatRows, setSelectedBoxes]);

useEffect(() => {
// refetch
const newStateFilter = filters.find((filter) => filter.id === "state");
Expand Down Expand Up @@ -211,7 +202,6 @@ function ProductsTable({
}
cursor="pointer"
{...row.getRowProps()}
// onClick={() => onBoxRowClick(row.original.labelIdentifier)}
key={row.original.id}
>
{row.cells.map((cell) => (
Expand Down

0 comments on commit 02bda0d

Please sign in to comment.