diff --git a/react/src/Settings.js b/react/src/Settings.js index 2637888b9..85e4b962a 100644 --- a/react/src/Settings.js +++ b/react/src/Settings.js @@ -167,23 +167,32 @@ export function EditableField(props) { /> {isCurrency ? 'atto' : 'bytes'}
Save
Cancel
- { BigInt(currentVal) > oneNanoFil ? ( - ({humanFIL(BigInt(currentVal))}) - ) : null } + ) : ( setEditing(true)}> {displayVal} - { BigInt(currentVal) > oneNanoFil ? ( - ({humanFIL(BigInt(currentVal))}) - ) : null } + { isCurrency ? : null } )} ) } +function PreviewAmt({currentVal, isCurrency}) { + if (isCurrency) { + if (BigInt(currentVal) > oneNanoFil) { + return ({humanFIL(BigInt(currentVal))}) + } + } else { + if (BigInt(currentVal) > BigInt(1024)) { + return ({humanFileSize(BigInt(currentVal))}) + } + } + return null +} + export function SettingsMenuItem(props) { return (