Minor changes
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from "react";
|
import { useState } from "react";
|
||||||
import { FiEye, FiEyeOff } from "react-icons/fi";
|
import { FiEye, FiEyeOff } from "react-icons/fi";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import toast, { Toaster } from "react-hot-toast";
|
import toast, { Toaster } from "react-hot-toast";
|
||||||
@@ -6,7 +6,6 @@ import toast, { Toaster } from "react-hot-toast";
|
|||||||
// const API_BASE_URL = process.env.REACT_APP_API_URL;
|
// const API_BASE_URL = process.env.REACT_APP_API_URL;
|
||||||
const API_BASE_URL = import.meta.env.VITE_API_URL;
|
const API_BASE_URL = import.meta.env.VITE_API_URL;
|
||||||
|
|
||||||
|
|
||||||
const SignUp = () => {
|
const SignUp = () => {
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
firstname: "",
|
firstname: "",
|
||||||
@@ -59,7 +58,7 @@ const SignUp = () => {
|
|||||||
toast.error(data.message || "Signup failed.", { id: toastId });
|
toast.error(data.message || "Signup failed.", { id: toastId });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.error("An error occurred. Please try again.");
|
toast.error("An error occurred. Please try again.", error);
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -171,8 +170,6 @@ const SignUp = () => {
|
|||||||
|
|
||||||
export default SignUp;
|
export default SignUp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// // eslint-disable-next-line no-unused-vars
|
// // eslint-disable-next-line no-unused-vars
|
||||||
// import React, { useState } from "react";
|
// import React, { useState } from "react";
|
||||||
// import { FiEye, FiEyeOff } from "react-icons/fi";
|
// import { FiEye, FiEyeOff } from "react-icons/fi";
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
import React, { useState } from "react";
|
import { useState } from "react";
|
||||||
// Adjust the import for FileUpload to the correct location:
|
|
||||||
import FileUploadModal from "../../components/FileUploadModal";
|
import FileUploadModal from "../../components/FileUploadModal";
|
||||||
const UploadFile = () => {
|
const UploadFile = () => {
|
||||||
// Control modal visibility with state
|
|
||||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||||
|
|
||||||
// Dummy callback or proper function if necessary
|
|
||||||
const fetchFiles = () => {
|
const fetchFiles = () => {
|
||||||
console.log("Upload succeeded, fetch or update file list here.");
|
console.log("Upload succeeded, fetch or update file list here.");
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user