feat: add bee-desktop settings capabilities (#323)

* refactor: make the config readonly and extract endpoint calls to hook (+2 squashed commits)
Squashed commits:
[91ffe45] feat: add swap-endpoint
[e1d0c3a] feat: add bee-desktop settings capabilities

* feat: use the request mechanism that uses the bee-desktop API key

* fix: properly reset the error or on error set the config to null
This commit is contained in:
Vojtech Simetka
2022-04-29 12:30:46 +05:00
committed by GitHub
parent 8114fa7d73
commit 87b0b71cc6
5 changed files with 96 additions and 8 deletions
+4 -2
View File
@@ -55,7 +55,7 @@ interface Props {
confirmLabelDisabled?: boolean
loading?: boolean
onChange?: (value: string) => void
onConfirm: (value: string) => void
onConfirm?: (value: string) => void
mapperFn?: (value: string) => string
locked?: boolean
}
@@ -138,7 +138,9 @@ export default function ExpandableListItemKey({
}
loading={loading}
iconType={Search}
onClick={() => onConfirm(inputValue)}
onClick={() => {
if (onConfirm) onConfirm(inputValue)
}}
>
{confirmLabel || 'Save'}
</SwarmButton>