"chore: update frontend dev script to include lint checks and add ESLint config file"
This commit is contained in:
@@ -37,19 +37,22 @@ export function InvoiceDetails({ invoice }: Props) {
|
||||
const { t } = useTranslation();
|
||||
const [currentStatus, setCurrentStatus] = useState(invoice?.status);
|
||||
|
||||
const handleChangeStatus = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
// setCurrentStatus(event.target.value);
|
||||
const handleChangeStatus = useCallback(
|
||||
(event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
||||
// setCurrentStatus(event.target.value);
|
||||
|
||||
try {
|
||||
changeStatus(invoice.id, event.target.value);
|
||||
setCurrentStatus(event.target.value);
|
||||
try {
|
||||
changeStatus(invoice.id, event.target.value);
|
||||
setCurrentStatus(event.target.value);
|
||||
|
||||
toast.success('status changed!');
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast.warning('error during changing status');
|
||||
}
|
||||
}, []);
|
||||
toast.success('status changed!');
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast.warning('error during changing status');
|
||||
}
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
const renderFooter = () => (
|
||||
<Box
|
||||
|
Reference in New Issue
Block a user