mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 02:07:10 +03:00
used created grooming utils function
This commit is contained in:
parent
95d8816536
commit
62e68a5998
@ -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}
|
||||
/>
|
||||
<SettingsItem
|
||||
|
@ -4,11 +4,11 @@ export const groomingServerName = (serverName) => {
|
||||
|
||||
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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user