diff --git a/src/pages/AddFoodItem.jsx b/src/pages/AddFoodItem.jsx index ee0cd2b..c6060b7 100644 --- a/src/pages/AddFoodItem.jsx +++ b/src/pages/AddFoodItem.jsx @@ -60,6 +60,7 @@ function AddFoodItem() { break; case "Dinner": apiUrl = `${process.env.REACT_APP_BASE_URL}/${canteenId}/dinner/add`; + console.log("This is api url",apiUrl); break; default: toast.error("Please select a meal type."); @@ -103,7 +104,8 @@ function AddFoodItem() { }; return ( -
+
+
{ const { _id } = useParams(); // Assuming you have canteen ID in the URL const navigate = useNavigate(); // useNavigate hook for navigation const [edit, setEditable] = useState(false); + const [editName, setEditName] = useState(false); + const [editEmail, setEditEmail] = useState(false); + const [editCollegeName, setEditCollegeName] = useState(false); + const [editImage, setEditImage] = useState(false); const [formData, setFormData] = useState({ name: '', email: '', @@ -93,12 +98,13 @@ const EditProfile = () => { return ( <> -
+

Edit Profile

@@ -106,52 +112,66 @@ const EditProfile = () => { - + + setEditName(!editName)} /> +
- + + setEditEmail(!editEmail)} /> +
- + + setEditCollegeName(!editCollegeName)} /> +
- + + setEditImage(!editImage)} /> +
{formData.canteenImage ? ( Canteen ) : ( @@ -159,7 +179,7 @@ const EditProfile = () => { )}
- {!edit && ( + {/* {!edit && ( - )} - {edit && ( + )} */} + <> - )}
diff --git a/src/pages/SectionPage.jsx b/src/pages/SectionPage.jsx index 7589ec2..3076897 100644 --- a/src/pages/SectionPage.jsx +++ b/src/pages/SectionPage.jsx @@ -116,7 +116,9 @@ const SectionPage = () => { Product List +
{view === "add" ? : } +
)} diff --git a/src/pages/Signup.jsx b/src/pages/Signup.jsx index b6f6204..c30b3c1 100644 --- a/src/pages/Signup.jsx +++ b/src/pages/Signup.jsx @@ -66,7 +66,7 @@ function Signup() { // : `${process.env.REACT_APP_BASE_URL}/canteenSignup`; const apiUrl = formData.accountType === "User" - ? 'http://localhost:4000/api/v1/studentSignup' : 'http://localhost:4000/api/v1/canteenSignup' + ? 'http://localhost:8000/api/v1/studentSignup' : 'http://localhost:8000/api/v1/canteenSignup' @@ -74,6 +74,8 @@ function Signup() { setLoading(true); const response = await axios.post(apiUrl, formData); + + console.log("This is response", response.data); toast.success("Account Created Successfully!");