Skip to content

Commit

Permalink
server link onrender
Browse files Browse the repository at this point in the history
  • Loading branch information
shahidmonowarr committed Jan 22, 2023
1 parent b57a510 commit d030bac
Show file tree
Hide file tree
Showing 31 changed files with 48 additions and 48 deletions.
22 changes: 11 additions & 11 deletions .firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ fakeDB.JSON,1672332265410,63b437b0ebaee613776f1bf6fd8b96ba4a412e234701a10f98be5f
favicon.ico,1655560771700,5e12c71418e52a573911a3e5128e1b55e316b5912f8e749f649084d26d4f483b
manifest.json,1655353656276,aff3449bdc238776f5d6d967f19ec491b36aed5fb7f23ccff6500736fd58494a
robots.txt,1655353657779,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49
asset-manifest.json,1674321079779,968b0a95e2926e09c4f72c68138f7c3ae9c2b5b4f856a03c85826c4075143e5a
index.html,1674321079778,0376170f8520a321c5363540c72a2c64ea0161ba1b8d34e0833a8819fbe62a9a
static/js/787.beb77ff5.chunk.js,1674321079825,864efbac16a80e6f42adeaa335e089695d7873578a88cd006045ebb9cfa16cbe
static/js/787.beb77ff5.chunk.js.map,1674321079826,a49faf1fb700667092e4f4cad92519fb3364e7fccfe2c911b0346534a2a9dcbd
static/js/main.b3d43a91.js.LICENSE.txt,1674321079824,a4bf333c58f9e94274c19b9aee77a652337affee13e747a3e15415ca14c01597
static/media/review.8693276546367883219d.jpg,1674321079823,6e79fc230beb384db59ceec9ebcdf2eb74b2270d4c032860146711b7f4e501bb
static/css/main.8ad47871.css,1674321079825,5bd5ed44ba62088eff9ce66bc3d6c291419aefb4f19ece36fcf91be1eae87c1a
static/media/logo.e89c1383872aa95a5c3c.png,1674321079824,0562a877f82e12c660fc14436a6da61e9a7033cda1b7e95fd9d4e0d9e0a06d57
static/css/main.8ad47871.css.map,1674321079825,bd96a7cabf25d7eb542f815dda8f55ccfdc3af3f8f93e4e2fa926cb37fc0e5ac
static/js/main.b3d43a91.js,1674321079825,7c59bcdd750720e9eda85b421e5cf6ad2843adb419889fafa15107340ca64773
static/js/main.b3d43a91.js.map,1674321079827,f1fc958063c8890ea545f771dae4f6efebcaafc4bce23c97deb5a36912e42b71
asset-manifest.json,1674365333774,64d1fec035df696de3cb34be81180d4f6584b1e1ba952e354e1b4d9b2b5602bf
index.html,1674365333743,1c92ebe9002d9ca8c8b7e449debb7dc050d3791d1eb253ed26a2d4be70b16ed6
static/js/787.beb77ff5.chunk.js,1674365333774,864efbac16a80e6f42adeaa335e089695d7873578a88cd006045ebb9cfa16cbe
static/js/main.b90ac480.js.LICENSE.txt,1674365333774,a4bf333c58f9e94274c19b9aee77a652337affee13e747a3e15415ca14c01597
static/js/787.beb77ff5.chunk.js.map,1674365333774,a49faf1fb700667092e4f4cad92519fb3364e7fccfe2c911b0346534a2a9dcbd
static/media/review.8693276546367883219d.jpg,1674365333774,6e79fc230beb384db59ceec9ebcdf2eb74b2270d4c032860146711b7f4e501bb
static/media/logo.e89c1383872aa95a5c3c.png,1674365333774,0562a877f82e12c660fc14436a6da61e9a7033cda1b7e95fd9d4e0d9e0a06d57
static/css/main.8ad47871.css,1674365333774,5bd5ed44ba62088eff9ce66bc3d6c291419aefb4f19ece36fcf91be1eae87c1a
static/css/main.8ad47871.css.map,1674365333774,bd96a7cabf25d7eb542f815dda8f55ccfdc3af3f8f93e4e2fa926cb37fc0e5ac
static/js/main.b90ac480.js,1674365333774,ca34f67a9e54bb1ce7b1c0b94e5932b09bdc8d52f4f050e83bc320900cf31a28
static/js/main.b90ac480.js.map,1674365333774,fcf44a8f020d3423954adfffdca7d1aba92ecb4579d26ac06a3905a7766c7aa6
2 changes: 1 addition & 1 deletion src/Pages/AllReviews/Reviews/Reviews.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Reviews = () => {
const [loading, setLoading] = useState(true);
const [reviews, setReviews]=useState();
useEffect(() => {
fetch("https://tech-specter-server.vercel.app/reviews")
fetch("https://tech-specter.onrender.com/reviews")
.then((res) => res.json())
.then((data) => {
setReviews(data);
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/BloodsPage/AvailableDonor/AvailableDonor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const AvailableDonor = () => {
const [donors, setDonors] = useState([]);

useEffect(() => {
fetch("https://tech-specter-server.vercel.app/blood")
fetch("https://tech-specter.onrender.com/blood")
.then((res) => res.json())
.then((data) => {
// console.log(data);
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/BloodsPage/BloodDonate/BloodDonate.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const BloodDonate = () => {
const [user] = useAuthState(auth);
const onSubmit = (data) => {
// console.log(data);
axios.post("https://tech-specter-server.vercel.app/blood", data).then((res) => {
axios.post("https://tech-specter.onrender.com/blood", data).then((res) => {
if (res.data.insertedId) {
toast("Details Added Successfully, We will contact you soon");
reset();
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/BloodsPage/BloodPatient/BloodPatient.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const BloodPatient = () => {

const onSubmit = (data) => {
// console.log(data);
axios.post("https://tech-specter-server.vercel.app/patient", data).then((res) => {
axios.post("https://tech-specter.onrender.com/patient", data).then((res) => {
if (res.data.insertedId) {
toast("Request Added Successfully, We will contact you soon");
reset();
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/CheckOut/CheckOut/CheckOut.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const CheckOut = () => {
status: "Pending"

}
axios.post('https://tech-specter-server.vercel.app/order', order)
axios.post('https://tech-specter.onrender.com/order', order)
.then(res => {
const {data}= res;
if (data.insertedId) {
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/CoursesPage/AllCourses/AllCourses.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const AllCourses = () => {
const [courses, setCourses] = useState([]);
const count = courses.length;
useEffect(() => {
fetch("https://tech-specter-server.vercel.app/course")
fetch("https://tech-specter.onrender.com/course")
.then((res) => res.json())
.then((data) => {
setCourses(data);
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/CoursesPage/CourseDetails/CourseDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CourseDetails = () => {
const [reviews, setReviews] = useState();

useEffect(() => {
fetch("https://tech-specter-server.vercel.app/reviews")
fetch("https://tech-specter.onrender.com/reviews")
.then((res) => res.json())
.then((data) => {
setReviews(data);
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Dashboard/AddBlog/AddBlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const AddBlog = () => {
const onSubmit = (data) => {
console.log(data);

axios.post("https://tech-specter-server.vercel.app/blogs", data).then((res) => {
axios.post("https://tech-specter.onrender.com/blogs", data).then((res) => {
if (res.data.insertedId) {
toast("Blog Added Successfully");
reset();
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Dashboard/AddCourse/AddCourse.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const AddCourse = () => {
const onSubmit = (data) => {
// console.log(data);

axios.post("https://tech-specter-server.vercel.app/course", data).then((res) => {
axios.post("https://tech-specter.onrender.com/course", data).then((res) => {
if (res.data.insertedId) {
toast("Added Successfully");
reset();
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Dashboard/AddPlace/AddPlace.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const AddPlace = () => {
const onSubmit = (data) => {
// console.log(data);

axios.post("https://tech-specter-server.vercel.app/travel", data).then((res) => {
axios.post("https://tech-specter.onrender.com/travel", data).then((res) => {
if (res.data.insertedId) {
toast("Place Added Successfully");
reset();
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Dashboard/AddReview/AddReview.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const AddReview = () => {
// console.log(data);
data.rating = rating;

axios.post("https://tech-specter-server.vercel.app/reviews", data).then((res) => {
axios.post("https://tech-specter.onrender.com/reviews", data).then((res) => {
if (res.data.insertedId) {
toast("Review Added Successfully");
reset();
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Dashboard/AllTransaction/AllTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const AllTransaction = () => {
setAllOrder,
isLoading,
} = useQuery("allOrder", () =>
fetch("https://tech-specter-server.vercel.app/order", {
fetch("https://tech-specter.onrender.com/order", {
method: "GET",
headers: {
authorization: `Bearer ${localStorage.getItem("accessToken")}`,
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Dashboard/CheckoutForm/CheckoutForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CheckoutForm = ({ singleOrder }) => {
const { _id, price, email } = singleOrder;

useEffect(() => {
fetch("https://tech-specter-server.vercel.app/create-payment-intent", {
fetch("https://tech-specter.onrender.com/create-payment-intent", {
method: "POST",
headers: {
"content-type": "application/json",
Expand Down Expand Up @@ -78,7 +78,7 @@ const CheckoutForm = ({ singleOrder }) => {
singleOrder: _id,
transactionId: paymentIntent.id
}
fetch( `https://tech-specter-server.vercel.app/order/${_id}`,{
fetch( `https://tech-specter.onrender.com/order/${_id}`,{
method: "PATCH",
headers: {
"content-type": "application/json",
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Dashboard/DashboardHome/DashboardHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const DashboardHome = () => {

useEffect(() => {
if (user) {
fetch(`https://tech-specter-server.vercel.app/userProfile?email=${user.email}`, {
fetch(`https://tech-specter.onrender.com/userProfile?email=${user.email}`, {
method: "GET",
headers: {
authorization: `Bearer ${localStorage.getItem("accessToken")}`,
Expand Down Expand Up @@ -51,7 +51,7 @@ const DashboardHome = () => {
address: event.target.address.value,
about: event.target.about.value,
};
axios.post("https://tech-specter-server.vercel.app/userProfile", profile).then((res) => {
axios.post("https://tech-specter.onrender.com/userProfile", profile).then((res) => {
const { data } = res;
if (data.insertedId) {
toast("Your Profile is Updated");
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Dashboard/ManageCourses/ManageCourses.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ManageCourses = () => {
isLoading,
refetch,
} = useQuery("allCourses", () =>
fetch("https://tech-specter-server.vercel.app/course", {
fetch("https://tech-specter.onrender.com/course", {
method: "GET",
headers: {
authorization: `Bearer ${localStorage.getItem("accessToken")}`,
Expand All @@ -23,7 +23,7 @@ const ManageCourses = () => {
const handleDeleteCourse = (id) => {
const proceed = window.confirm("Are Sure To Cancel This Order?");
if (proceed) {
const url = `https://tech-specter-server.vercel.app/course/${id}`;
const url = `https://tech-specter.onrender.com/course/${id}`;
fetch(url, {
method: "DELETE",
headers: {
Expand Down
6 changes: 3 additions & 3 deletions src/Pages/Dashboard/ManageOrders/ManageOrders.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const ManageOrders = () => {
isLoading,
refetch,
} = useQuery("allOrder", () =>
fetch("https://tech-specter-server.vercel.app/order", {
fetch("https://tech-specter.onrender.com/order", {
method: "GET",
headers: {
authorization: `Bearer ${localStorage.getItem("accessToken")}`,
Expand All @@ -27,7 +27,7 @@ const ManageOrders = () => {
const matchedOrder = allOrder.filter((order) => order._id === id);
matchedOrder[0].status = "Confirmed";

fetch(`https://tech-specter-server.vercel.app/order/${id}`, {
fetch(`https://tech-specter.onrender.com/order/${id}`, {
method: "PUT",
headers: {
"content-type": "application/json",
Expand All @@ -48,7 +48,7 @@ const ManageOrders = () => {
const handleDeleteOrder = (id) => {
const proceed = window.confirm("Are Sure To Cancel This Order?");
if (proceed) {
const url = `https://tech-specter-server.vercel.app/order/${id}`;
const url = `https://tech-specter.onrender.com/order/${id}`;
fetch(url, {
method: "DELETE",
headers: {
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Dashboard/ManagePlaces/ManagePlaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const ManagePlaces = () => {
setAllPlaces,
isLoading
} = useQuery("allPlaces", () =>
fetch("https://tech-specter-server.vercel.app/travel", {
fetch("https://tech-specter.onrender.com/travel", {
method: "GET",
headers: {
authorization: `Bearer ${localStorage.getItem("accessToken")}`,
Expand All @@ -22,7 +22,7 @@ const ManagePlaces = () => {
const handleDeletePlace = (id) => {
const proceed = window.confirm("Are Sure To Cancel This Order?");
if (proceed) {
const url = `https://tech-specter-server.vercel.app/travel/${id}`;
const url = `https://tech-specter.onrender.com/travel/${id}`;
fetch(url, {
method: "DELETE",
headers: {
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Dashboard/Orders/Orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Orders = () => {

useEffect(() => {
if (user) {
fetch(`https://tech-specter-server.vercel.app/order?email=${user.email}`, {
fetch(`https://tech-specter.onrender.com/order?email=${user.email}`, {
method: "GET",
headers: {
authorization: `Bearer ${localStorage.getItem("accessToken")}`,
Expand All @@ -39,7 +39,7 @@ const Orders = () => {
const handleDeleteOrder = (id) => {
const proceed = window.confirm("Are Sure To Cancel This Order?");
if (proceed) {
const url = `https://tech-specter-server.vercel.app/order/${id}`;
const url = `https://tech-specter.onrender.com/order/${id}`;
fetch(url, {
method: "DELETE",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Dashboard/Payment/Payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Payment = () => {
const [user, loading, error] = useAuthState(auth);

const {id} = useParams();
const url = `https://tech-specter-server.vercel.app/order/${id}`;
const url = `https://tech-specter.onrender.com/order/${id}`;

const {data: singleOrder, isLoading} = useQuery(['order', id], () => fetch(url, {
method: 'GET',
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Dashboard/Users/UserRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const UserRow = ({user, index, refetch}) => {
const {email, role} = user;

const makeAdmin = () =>{
fetch(`https://tech-specter-server.vercel.app/user/admin/${email}`,{
fetch(`https://tech-specter.onrender.com/user/admin/${email}`,{
method: 'PUT',
headers: {
authorization: `Bearer ${localStorage.getItem('accessToken')}`
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Dashboard/Users/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Loading from '../../../Components/Shared/Loading/Loading';
import UserRow from './UserRow';

const Users = () => {
const { data: users, isLoading, refetch } = useQuery('users', () => fetch('https://tech-specter-server.vercel.app/user', {
const { data: users, isLoading, refetch } = useQuery('users', () => fetch('https://tech-specter.onrender.com/user', {
method: 'GET',
headers:{
authorization: `Bearer ${localStorage.getItem('accessToken')}`
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/EducationBlogsPage/AllBlogs/AllBlogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const AllBlogs = () => {
const count = blogs.length;

useEffect(() => {
fetch("https://tech-specter-server.vercel.app/blogs")
fetch("https://tech-specter.onrender.com/blogs")
.then((res) => res.json())
.then((data) => {
console.log(data);
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/PlaceBooking/PlaceBooking.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const PlaceBooking = () => {
status: "Pending"

}
axios.post('https://tech-specter-server.vercel.app/order', order)
axios.post('https://tech-specter.onrender.com/order', order)
.then(res => {
const {data}= res;
if (data.insertedId) {
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/TravelPage/AllPlaces/AllPlaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const AllPlaces = () => {
const count = places.length;

useEffect(() => {
fetch("https://tech-specter-server.vercel.app/travel")
fetch("https://tech-specter.onrender.com/travel")
.then((res) => res.json())
.then((data) => {
setPlaces(data);
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/TravelPage/PlaceDetails/PlaceDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PlaceDetails = () => {
const [reviews, setReviews] = useState();

useEffect(() => {
fetch("https://tech-specter-server.vercel.app/reviews")
fetch("https://tech-specter.onrender.com/reviews")
.then((res) => res.json())
.then((data) => {
setReviews(data);
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useAdmin/useAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const useAdmin = user =>{
useEffect( () =>{
const email = user?.email;
if(email){
fetch(`https://tech-specter-server.vercel.app/admin/${email}`, {
fetch(`https://tech-specter.onrender.com/admin/${email}`, {
method:'GET',
headers: {
'content-type': 'application/json',
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useBlogDetails/useBlogDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const useBlogDetails = blogId => {
const [blog, setBlog] = useState({});

useEffect(() => {
const url = `https://tech-specter-server.vercel.app/blogs/${blogId}`;
const url = `https://tech-specter.onrender.com/blogs/${blogId}`;

fetch(url)
.then((res) => res.json())
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useCourseDetails/useCourseDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const useCourseDetails = serviceId => {
const [course, setCourse] = useState({});

useEffect(() => {
const url = `https://tech-specter-server.vercel.app/course/${serviceId}`;
const url = `https://tech-specter.onrender.com/course/${serviceId}`;

fetch(url)
.then((res) => res.json())
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/usePlaceDetails/usePlaceDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const usePlaceDetails = serviceId => {
const [place, setPlace] = useState({});

useEffect(() => {
const url = `https://tech-specter-server.vercel.app/travel/${serviceId}`;
const url = `https://tech-specter.onrender.com/travel/${serviceId}`;

fetch(url)
.then((res) => res.json())
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useToken/useToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const useToken = user =>{
const email = user?.user?.email;
const currentUser = {email: email};
if(email){
fetch(`https://tech-specter-server.vercel.app/user/${email}`, {
fetch(`https://tech-specter.onrender.com/user/${email}`, {
method:'PUT',
headers: {
'content-type': 'application/json'
Expand Down

0 comments on commit d030bac

Please sign in to comment.