From 03c17ad03beb44b35389b3a75b02a3d8c653166a Mon Sep 17 00:00:00 2001 From: u-e Date: Wed, 12 Jun 2019 21:39:43 +0300 Subject: [PATCH] enhanced points view for not found point type error --- src/components/points/view/pointsView.js | 24 +++++++++++++----------- src/constants/options/points.js | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/components/points/view/pointsView.js b/src/components/points/view/pointsView.js index 181575294..681cb850d 100644 --- a/src/components/points/view/pointsView.js +++ b/src/components/points/view/pointsView.js @@ -64,9 +64,9 @@ class PointsView extends Component { - {userPoints.points} + {get(userPoints, 'points')} eSteem Points - {userPoints.unclaimed_points > 0 && ( + {get(userPoints, 'unclaimed_points') > 0 && ( claimPoints()} > - {userPoints.unclaimed_points} + {get(userPoints, 'unclaimed_points')} @@ -89,7 +89,7 @@ class PointsView extends Component { data={POINTS_KEYS} horizontal renderItem={({ item }) => ( - + {({ openPopover, closePopover, @@ -97,15 +97,15 @@ class PointsView extends Component { setPopoverAnchor, popoverAnchorRect, }) => ( - + - {intl.formatMessage({ id: POINTS[item.type].nameKey })} + {intl.formatMessage({ id: get(POINTS[get(item, 'type')], 'nameKey') })} - {intl.formatMessage({ id: POINTS[item.type].descriptionKey })} + {intl.formatMessage({ + id: get(POINTS[get(item, 'type')], 'descriptionKey'), + })} @@ -150,7 +152,7 @@ class PointsView extends Component { renderItem={({ item, index }) => (