summaryrefslogtreecommitdiff
path: root/src/components/APIConfig.js
diff options
context:
space:
mode:
authorhaishanh <[email protected]>2018-11-05 18:32:16 +0800
committerHaishan <[email protected]>2018-11-06 22:37:21 +0800
commit91ecdaa5dd1a65ff0ae944896945c0fe4bc23574 (patch)
tree9f7f476672fae91eca5df9e0ae021b45df950679 /src/components/APIConfig.js
parent1adaedcbc551f6beee4e9e0b9fbd94197ebdffe5 (diff)
update: convert more components to function ones
includes Input, Config, SideBard. also removed react-redux Provider
Diffstat (limited to 'src/components/APIConfig.js')
-rw-r--r--src/components/APIConfig.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/components/APIConfig.js b/src/components/APIConfig.js
index 9654bce..5746040 100644
--- a/src/components/APIConfig.js
+++ b/src/components/APIConfig.js
@@ -27,12 +27,9 @@ function APIConfig2() {
const handleInputOnChange = e => {
const target = e.target;
const { name } = target;
- let value = target.value.trim();
-
- if (value === '') return;
+ let value = target.value;
switch (name) {
case 'port':
- if (Number(value) < 0 || Number(value) > 65535) return;
setPort(value);
break;
case 'hostname':