From 62e68a5998305cea1c2e38dfd2c071590c89e40c Mon Sep 17 00:00:00 2001 From: u-e Date: Wed, 16 Jan 2019 11:25:53 +0300 Subject: [PATCH] used created grooming utils function --- src/screens/settings/screen/settingsScreen.js | 4 ++-- src/utils/settings.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/screens/settings/screen/settingsScreen.js b/src/screens/settings/screen/settingsScreen.js index 079b31fb6..fe1dd1f7d 100644 --- a/src/screens/settings/screen/settingsScreen.js +++ b/src/screens/settings/screen/settingsScreen.js @@ -78,9 +78,9 @@ class SettingsScreen extends PureComponent { })} type="dropdown" actionType="api" - options={serverList.map(server => server)} + options={serverList.map(serverName => groomingServerName(serverName))} selectedOptionIndex={serverList.indexOf(selectedApi)} - defaultText={selectedApi} + defaultText={groomingServerName(selectedApi)} handleOnChange={handleOnChange} /> { if (!serverName) return null; - if (serverName.indefOf(PREFIX1) === 0) { - return serverName.str.substr(PREFIX1.length); + if (serverName.indexOf(PREFIX1) === 0) { + return serverName.substr(PREFIX1.length); } - if (serverName.indefOf(PREFIX2) === 0) { - return serverName.str.substr(PREFIX2.length); + if (serverName.indexOf(PREFIX2) === 0) { + return serverName.substr(PREFIX2.length); } return serverName; };