Skip to content

Commit 4a0b8f6

Browse files
committed
Update LoadPopup.jsx
- Push Fix
1 parent 81c7e8d commit 4a0b8f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Frontend/src/Components/Matching/LoadPopup.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ export const LoadPopup = ({ isOpen, isClose, userId, onMatchCancelled }) => {
1818
const handleCancelMatching = () => {
1919
setButtonEnabled(false);
2020

21-
axios.delete(`/home/${userId}/matching`)
21+
const URL = `http://localhost:3004/home/${userId}/matching`;
22+
axios.delete(URL)
2223
.then(response => {
2324
if (response.status !== 200) {
2425
throw new Error(response.data.message);
2526
}
2627
console.log(response.data.message);
27-
onMatchCancelled(); // match is cancelled
28+
onMatchCancelled(); // Inform the parent component that the match is cancelled
2829
})
2930
.catch(error => {
3031
console.error("Error canceling the match: ", error);

0 commit comments

Comments
 (0)