Changeset cfc16a3 for my-react-app/src/components/Customers.js
- Timestamp:
- 03/03/24 10:52:49 (15 months ago)
- Branches:
- main
- Children:
- c63036a
- Parents:
- 75f5086
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
my-react-app/src/components/Customers.js
r75f5086 rcfc16a3 35 35 await axios.delete(`http://localhost:8080/api/customers/delete/${customerId}`); 36 36 setCustomers(customers.filter(customer => customer.customerID !== customerId)); 37 alert('Reservation canceled successfully');37 window.location.reload(); 38 38 } catch (error) { 39 39 console.error("Error + " + error); 40 alert("An error occurred while deleting");41 40 } 42 41 }
Note:
See TracChangeset
for help on using the changeset viewer.