Compare commits

..

No commits in common. "04d9b8641929443e1d674619fa8bd11ccadbd6d4" and "6d0a62ec21acec8eebfeb1d88c4a0a9328f702e8" have entirely different histories.

View file

@ -30,9 +30,6 @@ export const CheckoutBookModal = ({
const onSubmit = useCallback(
async (data: Partial<BookCheckoutForm>) => {
if (!formState.isValid) {
return;
}
if (!data.checkoutBy) {
setError("checkoutBy", {
message: `please enter ${
@ -64,7 +61,7 @@ export const CheckoutBookModal = ({
setFailed(await res.text());
}
},
[formState.isValid, isChechout, uuid, setError, onClose]
[uuid, onClose, setError, isChechout]
);
return (
@ -119,12 +116,6 @@ export const CheckoutBookModal = ({
"'null' is not a valid nickname"
);
},
notUndefinedString: (value) => {
return (
value?.toLocaleLowerCase() !== "undefined" ||
"'undefined' is not a valid nickname"
);
},
},
})}
isInvalid={!!formState.errors.checkoutBy}
@ -193,7 +184,6 @@ export const CheckoutBookModal = ({
marginLeft: "auto",
marginRight: "10px",
}}
disabled={!formState.isValid}
onClick={() => onSubmit(values)}
>
{`${isChechout ? "Checkout" : "Return"} book`}