diff --git a/src/components/AccountUpdatePage.js b/src/components/AccountUpdatePage.js index f93e9d7..e8effc0 100644 --- a/src/components/AccountUpdatePage.js +++ b/src/components/AccountUpdatePage.js @@ -6,9 +6,9 @@ const AccountUpdatePage = ({ user, showEmail, onSubmit }) => { const [formData, setFormData] = useState({ username: user.username || '', email: user.email || '', - password: user.password === 'unsetunsetunset' ? '' : user.password || '', + password: '●●●●●', }); - + const [errorMessage, setErrorMessage] = useState(''); const [successMessage, setSuccessMessage] = useState(''); // New state for success messages @@ -58,7 +58,7 @@ const AccountUpdatePage = ({ user, showEmail, onSubmit }) => {
- + {
- + { + const imageUrl = "https://dev.api.kedaimaster.com/uploads/1739542152564.jpg"; // Image URL + + // Create a new XMLHttpRequest to fetch the image as a Blob + fetch(imageUrl) + .then((response) => response.blob()) // Convert the response to a Blob + .then((blob) => { + const link = document.createElement("a"); + link.href = URL.createObjectURL(blob); // Create a URL for the Blob + link.download = "QRCode.jpg"; // Set the download filename + link.click(); // Trigger the download + }) + .catch((error) => { + console.error("Failed to download the image:", error); + }); + } return (