1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-26 20:54:21 +01:00

(quality) remove unused props

This commit is contained in:
Sylvain 2022-10-05 16:09:18 +02:00
parent 794f6130d2
commit 3cb70c5cf0
2 changed files with 2 additions and 6 deletions

View File

@ -254,8 +254,7 @@ export const ProductStockForm = <TContext extends object> ({ currentFormValues,
</div>
</div>)}
</div>
<ProductStockModal onError={onError}
onSuccess={onNewStockMovement}
<ProductStockModal onSuccess={onNewStockMovement}
isOpen={isOpen}
toggleModal={toggleModal} />
</section>

View File

@ -19,7 +19,6 @@ type typeSelectOption = { value: StockType, label: string };
interface ProductStockModalProps {
onSuccess: (movement: ProductStockMovement) => void,
onError: (message: string) => void,
isOpen: boolean,
toggleModal: () => void,
}
@ -27,9 +26,7 @@ interface ProductStockModalProps {
/**
* Form to manage a product's stock movement and quantity
*/
// TODO: delete next eslint disable
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const ProductStockModal: React.FC<ProductStockModalProps> = ({ onError, onSuccess, isOpen, toggleModal }) => {
export const ProductStockModal: React.FC<ProductStockModalProps> = ({ onSuccess, isOpen, toggleModal }) => {
const { t } = useTranslation('admin');
const [movement, setMovement] = useState<'in' | 'out'>('in');