diff --git a/src/api/sendImg.js b/src/api/advertisementextract/sendImg.js similarity index 100% rename from src/api/sendImg.js rename to src/api/advertisementextract/sendImg.js diff --git a/src/api/sendPdf.js b/src/api/advertisementextract/sendPdf.js similarity index 100% rename from src/api/sendPdf.js rename to src/api/advertisementextract/sendPdf.js diff --git a/src/api/sendUrl.js b/src/api/advertisementextract/sendUrl.js similarity index 100% rename from src/api/sendUrl.js rename to src/api/advertisementextract/sendUrl.js diff --git a/src/layouts/authentication/sign-up/VerificationDialog.js b/src/layouts/authentication/sign-up/VerificationDialog.js index 39045e0..5754784 100644 --- a/src/layouts/authentication/sign-up/VerificationDialog.js +++ b/src/layouts/authentication/sign-up/VerificationDialog.js @@ -28,12 +28,10 @@ export default function VerificationDialog({ open, onClose, email, onSuccess, ad setTimeRemaining((prevTime) => prevTime - 1); }, 1000); - // Clear interval when component unmounts or dialog closes return () => { clearInterval(interval); }; } else if (!open) { - // Reset timer when dialog closes setTimeRemaining(60); } }, [open, timeRemaining]); @@ -48,7 +46,6 @@ export default function VerificationDialog({ open, onClose, email, onSuccess, ad .then(function (response) { console.log(response); if (response.data.success) { - // alert("Registration successful!"); setAlertType("success"); console.log(alertType); if (address === "verify") { @@ -66,11 +63,6 @@ export default function VerificationDialog({ open, onClose, email, onSuccess, ad onSuccess(); onClose(); } else if (address === "verify-email") { - // alert( - // "Your new password is " + - // response.data.newpassword + - // " Important: Please imeediately change your password after login" - // ); setAlertPassword(true); sethideComponent(false); setNewPassword(response.data.newpassword); @@ -96,12 +88,11 @@ export default function VerificationDialog({ open, onClose, email, onSuccess, ad axios .post(`${baseURL}/verify`, { email: email, - verificationCode: "", // Provide an empty code to indicate cancellation - cancel: true, // Add a flag to indicate cancellation + verificationCode: "", + cancel: true, }) .then(function (response) { console.log(response); - // setVerificationOpen(false); onClose(); }) .catch(function (error) { diff --git a/src/layouts/authentication/sign-up/index.js b/src/layouts/authentication/sign-up/index.js index ce61427..e030aff 100644 --- a/src/layouts/authentication/sign-up/index.js +++ b/src/layouts/authentication/sign-up/index.js @@ -23,7 +23,6 @@ import bgImage from "assets/images/newspaper2.jpg"; import VerificationDialog from "./VerificationDialog"; import { useNavigate } from "react-router-dom"; -// import { useUser } from "utils/userContext"; import baseURL from "config"; import TermModal from "./term"; @@ -33,7 +32,6 @@ function Cover() { const [name, setName] = useState(""); const navigate = useNavigate(); const [showSuccessAlert, setShowSuccessAlert] = useState(false); - // const { login } = useUser(); const [verificationOpen, setVerificationOpen] = useState(false); @@ -94,11 +92,7 @@ function Cover() { } else { return response.json().then((data) => { console.log(data); - // const userData = data.user; - // console.log(userData); setVerificationOpen(true); - - // navigate("/dashboard"); }); } }) @@ -189,8 +183,6 @@ function Cover() {   I agree the  setVerificationOpen(false)} - email={email} // Pass the email to the dialog + email={email} onSuccess={() => { - // Handle successful verification if needed setShowSuccessAlert(true); setTimeout(() => { setShowSuccessAlert(false); diff --git a/src/layouts/authentication/sign-up/term.js b/src/layouts/authentication/sign-up/term.js index 09ece52..8e19660 100644 --- a/src/layouts/authentication/sign-up/term.js +++ b/src/layouts/authentication/sign-up/term.js @@ -9,10 +9,9 @@ import MDTypography from "components/MDTypography"; function TermModal({ open, onClose }) { const cardContentStyle = { - // Add your desired width and height for the modal - width: "80%", // Adjust as needed - height: "80vh", // Adjust as needed - overflowY: "scroll", // Add a vertical scroll when the content exceeds the height + width: "80%", + height: "80vh", + overflowY: "scroll", }; return ( setMenu(currentTarget); const closeMenu = () => setMenu(null); useEffect(() => { - // This code will run when the component is initially rendered. - console.log("Component is initially rendered."); setSelectedData(landSale); - // You can place your logic here. }, []); const handleMenuItemClick = (dataKey) => { setSelectedData(dataKey); diff --git a/src/layouts/dashboard/components/adCard.js b/src/layouts/dashboard/components/adCard.js index 1c76707..80837a1 100644 --- a/src/layouts/dashboard/components/adCard.js +++ b/src/layouts/dashboard/components/adCard.js @@ -132,7 +132,7 @@ export const AdCard = () => { { color: "info", label: "view Ad", }} - // authors={123} /> diff --git a/src/layouts/upload/inputImage.js b/src/layouts/upload/inputImage.js index c7226c7..c50c867 100644 --- a/src/layouts/upload/inputImage.js +++ b/src/layouts/upload/inputImage.js @@ -4,7 +4,7 @@ import { Checkbox, Container, Typography } from "@mui/material"; import Card from "@mui/material/Card"; import MDButton from "components/MDButton"; -import { uploadImages } from "api/sendImg"; +import { uploadImages } from "api/advertisementextract/sendImg"; import MDBox from "components/MDBox"; import MDTypography from "components/MDTypography"; import { useAppState } from "utils/userContext"; diff --git a/src/layouts/upload/inputPDF.js b/src/layouts/upload/inputPDF.js index 8941466..51c9c36 100644 --- a/src/layouts/upload/inputPDF.js +++ b/src/layouts/upload/inputPDF.js @@ -6,7 +6,7 @@ import MDButton from "components/MDButton"; import MDBox from "components/MDBox"; import MDTypography from "components/MDTypography"; -import { uploadPdfs } from "api/sendPdf"; // Replace with your API endpoint for PDF upload +import { uploadPdfs } from "api/advertisementextract/sendPdf"; // Replace with your API endpoint for PDF upload import { useAppState } from "utils/userContext"; import { useState } from "react"; import Loading from "react-loading"; diff --git a/src/layouts/upload/inputURL.js b/src/layouts/upload/inputURL.js index a33866c..ac2623d 100644 --- a/src/layouts/upload/inputURL.js +++ b/src/layouts/upload/inputURL.js @@ -8,7 +8,7 @@ import MDTypography from "components/MDTypography"; import MDInput from "components/MDInput"; import Card from "@mui/material/Card"; -import { sendUrlToBackend } from "api/sendUrl"; +import { sendUrlToBackend } from "api/advertisementextract/sendUrl"; import Loading from "react-loading"; import { CardContent, Checkbox, Grid, Modal } from "@mui/material"; import emptyImage from "./empty.gif";