From a74cc93bbcdb33834af3566cf76f8748dad2bf8b Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Mon, 2 Feb 2026 13:00:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20remove=20unused=20Creem?= =?UTF-8?q?=20settings=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the unused originInputs state and redundant updates to keep the Creem settings form state minimal and easier to maintain. --- web/src/pages/Setting/Payment/SettingsPaymentGatewayCreem.jsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/web/src/pages/Setting/Payment/SettingsPaymentGatewayCreem.jsx b/web/src/pages/Setting/Payment/SettingsPaymentGatewayCreem.jsx index 18e8192d8..c3c04319e 100644 --- a/web/src/pages/Setting/Payment/SettingsPaymentGatewayCreem.jsx +++ b/web/src/pages/Setting/Payment/SettingsPaymentGatewayCreem.jsx @@ -27,7 +27,6 @@ export default function SettingsPaymentGatewayCreem(props) { CreemProducts: '[]', CreemTestMode: false, }); - const [originInputs, setOriginInputs] = useState({}); const [products, setProducts] = useState([]); const [showProductModal, setShowProductModal] = useState(false); const [editingProduct, setEditingProduct] = useState(null); @@ -49,7 +48,6 @@ export default function SettingsPaymentGatewayCreem(props) { CreemTestMode: props.options.CreemTestMode === 'true', }; setInputs(currentInputs); - setOriginInputs({ ...currentInputs }); formApiRef.current.setValues(currentInputs); // Parse products @@ -109,8 +107,6 @@ export default function SettingsPaymentGatewayCreem(props) { }); } else { showSuccess(t('更新成功')); - // 更新本地存储的原始值 - setOriginInputs({ ...inputs }); props.refresh?.(); } } catch (error) {