mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +03:00
created get title fucntion
This commit is contained in:
parent
fa9e53028f
commit
d571e442a2
@ -45,9 +45,15 @@ class BoostScreen extends PureComponent {
|
||||
};
|
||||
|
||||
_getTitle = title => {
|
||||
const lastIndex = title.lastIndexOf(' ');
|
||||
const _title = title && title.toLowerCase();
|
||||
|
||||
return title.substring(0, lastIndex);
|
||||
if (_title) {
|
||||
if (title.includes('(ESTEEM)')) return title.replace('(ESTEEM)', '');
|
||||
|
||||
return title.toUpperCase();
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
|
||||
render() {
|
||||
@ -81,7 +87,7 @@ class BoostScreen extends PureComponent {
|
||||
isLoading={false}
|
||||
>
|
||||
<View style={styles.buttonContent}>
|
||||
<Text style={styles.buttonText}>{get(item, 'title', '').toUpperCase()}</Text>
|
||||
<Text style={styles.buttonText}>{this._getTitle(get(item, 'title', ''))}</Text>
|
||||
<View style={styles.buttonIconWrapper}>
|
||||
<Icon name="add" iconType="MaterialIcons" color="#357ce6" size={23} />
|
||||
</View>
|
||||
|
Loading…
Reference in New Issue
Block a user