From 05c5545cbb6f84ffde5a1fabbd80768e7d6e7514 Mon Sep 17 00:00:00 2001
From: zadit <75159257+insvrgent@users.noreply.github.com>
Date: Mon, 17 Feb 2025 07:23:32 +0700
Subject: [PATCH] ok
---
src/components/AccountUpdatePage.js | 8 +--
src/components/ButtonWithReplica.css | 78 ++++++++++++++++++++++++-
src/components/ButtonWithReplica.js | 25 +++++++-
src/components/ItemConfig.js | 4 +-
src/components/ItemLister.js | 86 +++++++++++++++++-----------
src/helpers/itemHelper.js | 10 ++--
src/pages/CafePage.js | 2 +-
src/pages/Reports.js | 6 +-
src/pages/Transaction_confirmed.js | 2 +-
9 files changed, 169 insertions(+), 52 deletions(-)
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 (