From d571e442a27d1d83280aec784a179b29f842893a Mon Sep 17 00:00:00 2001 From: ue Date: Tue, 20 Aug 2019 20:11:23 +0300 Subject: [PATCH] created get title fucntion --- src/screens/boost/screen/boostScreen.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/screens/boost/screen/boostScreen.js b/src/screens/boost/screen/boostScreen.js index 36c4edae7..e663d1b47 100644 --- a/src/screens/boost/screen/boostScreen.js +++ b/src/screens/boost/screen/boostScreen.js @@ -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} > - {get(item, 'title', '').toUpperCase()} + {this._getTitle(get(item, 'title', ''))}