mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-07 10:31:46 +00:00
bugfix (not done)
This commit is contained in:
1 parent
4b97683a84
commit
854f6a852f
1 file changed
+1
-11
+1
-11
@@ -57,7 +57,7 @@ function BitsCheermotePrefixSpendThresholdForm(props: BitsCheermotePrefixSpendTh
|
||||
const updateCheerPrefix = (ev: React.FormEvent<HTMLSelectElement>) : boolean => {
|
||||
const value = (ev.target as HTMLSelectElement).value;
|
||||
setCheerPrefix(value);
|
||||
recalcuateFieldValue(value, bitsValue);
|
||||
setCustomCheerPrefix(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -68,16 +68,6 @@ function BitsCheermotePrefixSpendThresholdForm(props: BitsCheermotePrefixSpendTh
|
||||
return true;
|
||||
}
|
||||
|
||||
// When the dropdowns are used, replace any manual text entry.
|
||||
const recalcuateFieldValue = (prefix: string, bits: number) => {
|
||||
if (prefix === undefined) {
|
||||
return;
|
||||
}
|
||||
const cheerValue = `${prefix}`;
|
||||
setCustomCheerPrefix(cheerValue);
|
||||
props.updateCheerNameOrPrefix(cheerValue);
|
||||
}
|
||||
|
||||
const handleBitSelect = (ev: React.FormEvent<HTMLSelectElement>) : boolean => {
|
||||
const value = (ev.target as HTMLSelectElement).value;
|
||||
const numericValue = parseInt(value);
|
||||
|
||||
Reference in new issue
Block a user