Skip to content

Commit da24792

Browse files
committed
server updated
1 parent 6456fd9 commit da24792

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"web-vitals": "^1.1.2"
1818
},
1919
"scripts": {
20-
"start": "react-scripts start",
21-
"build": "react-scripts build",
20+
"start": "react-scripts --openssl-legacy-provider start",
21+
"build": "react-scripts --openssl-legacy-provider build",
2222
"test": "react-scripts test",
2323
"eject": "react-scripts eject"
2424
},

src/Pages/AddTours/AddTours.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const AddTours = () => {
1010
} = useForm();
1111

1212
const onSubmit = (data) => {
13-
fetch("https://lit-river-98467.herokuapp.com/addTour", {
13+
fetch("https://travele-tourism-server.onrender.com/addTour", {
1414
method: "POST",
1515
headers: { "content-type": "application/json" },
1616
body: JSON.stringify(data)

src/Pages/AllTours/AllTours.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const AllTours = () => {
77
const [isLoading, setLoading] = useState(true);
88

99
useEffect(() => {
10-
fetch("https://lit-river-98467.herokuapp.com/tours")
10+
fetch("https://travele-tourism-server.onrender.com/tours")
1111
.then((res) => res.json())
1212
.then((data) => {
1313
setTours(data);

src/Pages/Home/TourBooking/TourBooking.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ const TourBooking = () => {
1616
} = useForm();
1717

1818
useEffect(() => {
19-
fetch(`https://lit-river-98467.herokuapp.com/tour/${tourId}`)
19+
fetch(`https://travele-tourism-server.onrender.com/tour/${tourId}`)
2020
.then((res) => res.json())
2121
.then((data) => setTour(data));
2222
}, [tourId]);
2323

2424
const onSubmit = (data) => {
2525
data.tourName = tour.name;
2626
console.log(data);
27-
fetch("https://lit-river-98467.herokuapp.com/addBooking", {
27+
fetch("https://travele-tourism-server.onrender.com/addBooking", {
2828
method: "POST",
2929
headers: { "content-type": "application/json" },
3030
body: JSON.stringify(data)

src/Pages/Home/Tours/Tours.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const Tours = () => {
88
const [isLoading, setLoading] = useState(true);
99

1010
useEffect(() => {
11-
fetch("https://lit-river-98467.herokuapp.com/tours")
11+
fetch("https://travele-tourism-server.onrender.com/tours")
1212
.then((res) => res.json())
1313
.then((data) => {
1414
setTours(data);

src/Pages/MangeBookings/ManageBookings.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const ManageBookings = () => {
77
const [isLoading, setLoading] = useState(true);
88

99
useEffect(() => {
10-
fetch(`https://lit-river-98467.herokuapp.com/allBookings`)
10+
fetch(`https://travele-tourism-server.onrender.com/allBookings`)
1111
.then((res) => res.json())
1212
.then((data) => {
1313
setBookings(data);
@@ -18,7 +18,7 @@ const ManageBookings = () => {
1818
const handleDelete = (id) => {
1919
const checker = window.confirm("Are you sure to delete?");
2020
if (checker) {
21-
fetch(`https://lit-river-98467.herokuapp.com/deleteBooking/${id}`, {
21+
fetch(`https://travele-tourism-server.onrender.com/deleteBooking/${id}`, {
2222
method: "DELETE",
2323
headers: { "content-type": "application/json" }
2424
})
@@ -34,7 +34,7 @@ const ManageBookings = () => {
3434
};
3535

3636
const handleUpdate = (id) => {
37-
const url = `https://lit-river-98467.herokuapp.com/bookings/${id}`;
37+
const url = `https://travele-tourism-server.onrender.com/bookings/${id}`;
3838
fetch(url, {
3939
method: "PUT",
4040
headers: {

src/Pages/MyBookinngs/MyBookinngs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const MyBookinngs = () => {
99
const [isLoading, setLoading] = useState(true);
1010

1111
useEffect(() => {
12-
fetch(`https://lit-river-98467.herokuapp.com/myBookings/${user?.email}`)
12+
fetch(`https://travele-tourism-server.onrender.com/myBookings/${user?.email}`)
1313
.then((res) => res.json())
1414
.then((data) => {
1515
setBookings(data);
@@ -20,7 +20,7 @@ const MyBookinngs = () => {
2020
const handleDelete = (id) => {
2121
const checker = window.confirm("Are you sure to delete?");
2222
if (checker) {
23-
fetch(`https://lit-river-98467.herokuapp.com/deleteBooking/${id}`, {
23+
fetch(`https://travele-tourism-server.onrender.com/deleteBooking/${id}`, {
2424
method: "DELETE",
2525
headers: { "content-type": "application/json" }
2626
})

0 commit comments

Comments
 (0)