diff --git a/src/components/scaleSlider/scaleSliderStyles.js b/src/components/scaleSlider/scaleSliderStyles.js index 5f846a909..0049192be 100644 --- a/src/components/scaleSlider/scaleSliderStyles.js +++ b/src/components/scaleSlider/scaleSliderStyles.js @@ -42,4 +42,10 @@ export default EStyleSheet.create({ position: 'absolute', borderColor: '$primaryBlue', }, + selected: { + backgroundColor: '$primaryBlue', + }, + track: { + backgroundColor: '$primaryLightGray', + }, }); diff --git a/src/components/scaleSlider/scaleSliderView.js b/src/components/scaleSlider/scaleSliderView.js index fd6cf7295..fa3133718 100644 --- a/src/components/scaleSlider/scaleSliderView.js +++ b/src/components/scaleSlider/scaleSliderView.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import { View, Dimensions, Text } from 'react-native'; import MultiSlider from '@ptomasroos/react-native-multi-slider'; +import get from 'lodash/get'; import styles from './scaleSliderStyles'; @@ -8,8 +9,8 @@ export default class ScaleSliderView extends Component { constructor(props) { super(props); this.state = { - activeValue: props.activeValue || props.values[0], - activeIndex: props.values.indexOf(props.activeValue) || 0, + activeValue: get(props, 'activeValue') || props.values[0], + activeIndex: get(props, 'values', '').indexOf(get(props, 'activeValue')) || 0, }; } @@ -52,7 +53,7 @@ export default class ScaleSliderView extends Component { }; render() { - const { LRpadding, values, day } = this.props; + const { LRpadding, values } = this.props; const { activeIndex } = this.state; return ( @@ -62,8 +63,8 @@ export default class ScaleSliderView extends Component { ( - - - + ); const mapStateToProps = state => ({ diff --git a/src/containers/pointsContainer.js b/src/containers/pointsContainer.js index db0ecd5d7..25df83556 100644 --- a/src/containers/pointsContainer.js +++ b/src/containers/pointsContainer.js @@ -1,4 +1,3 @@ -/* eslint-disable no-unused-vars */ import React, { Component } from 'react'; import { Alert } from 'react-native'; import { connect } from 'react-redux'; @@ -116,7 +115,7 @@ class PointsContainer extends Component { this.setState({ userPoints, balance }); }) .catch(err => { - Alert.alert(err); + Alert.alert(err.message); }); await getUserPoints(username) diff --git a/src/providers/esteem/ePoint.js b/src/providers/esteem/ePoint.js index 624746985..823e9e5b5 100644 --- a/src/providers/esteem/ePoint.js +++ b/src/providers/esteem/ePoint.js @@ -1,12 +1,6 @@ import { Alert } from 'react-native'; -// import { Client, PrivateKey } from 'dsteem'; import ePointApi from '../../config/ePoint'; -// Utils -// import { decryptKey } from '../../utils/crypto'; - -// const client = new Client(getItem('server', 'https://api.steemit.com')); - export const userActivity = (us, ty, bl = '', tx = '') => new Promise(resolve => { const params = { us, ty };