mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-29 23:38:38 +00:00
🔧 chore: remove unused Creem settings state
Drop the unused originInputs state and redundant updates to keep the Creem settings form state minimal and easier to maintain.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user