Cleanup dead code

This commit is contained in:
Oliver Walters 2026-06-29 12:02:53 +00:00
parent 95622887aa
commit 2ec2ae9932
1 changed files with 2 additions and 11 deletions

View File

@ -18,7 +18,7 @@ import {
IconTruckDelivery,
IconUsersGroup
} from '@tabler/icons-react';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useEffect, useMemo, useState } from 'react';
import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
import { ModelType } from '@lib/enums/ModelType';
@ -825,15 +825,6 @@ function BuildConsumeItemRow({
}) {
const [quantity, setQuantity] = useState<number>(props.item?.quantity ?? 0);
const callChangeFn = useCallback(
(identifier: number | string, key: string, value: any) => {
queueMicrotask(() => {
props.changeFn(identifier, key, value);
});
},
[props.changeFn]
);
return (
<Table.Tr key={`table-row-${record.pk}`}>
<Table.Td>
@ -866,7 +857,7 @@ function BuildConsumeItemRow({
}
setQuantity(nextValue === '' ? 0 : nextValue);
callChangeFn(props.rowId, 'quantity', nextValue);
props.changeFn(props.rowId, 'quantity', nextValue);
}}
error={props.rowErrors?.quantity?.message}
/>