mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +03:00
fiec for review '
This commit is contained in:
parent
bd6c42e322
commit
41d2d44026
@ -42,4 +42,10 @@ export default EStyleSheet.create({
|
|||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
borderColor: '$primaryBlue',
|
borderColor: '$primaryBlue',
|
||||||
},
|
},
|
||||||
|
selected: {
|
||||||
|
backgroundColor: '$primaryBlue',
|
||||||
|
},
|
||||||
|
track: {
|
||||||
|
backgroundColor: '$primaryLightGray',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { View, Dimensions, Text } from 'react-native';
|
import { View, Dimensions, Text } from 'react-native';
|
||||||
import MultiSlider from '@ptomasroos/react-native-multi-slider';
|
import MultiSlider from '@ptomasroos/react-native-multi-slider';
|
||||||
|
import get from 'lodash/get';
|
||||||
|
|
||||||
import styles from './scaleSliderStyles';
|
import styles from './scaleSliderStyles';
|
||||||
|
|
||||||
@ -8,8 +9,8 @@ export default class ScaleSliderView extends Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
activeValue: props.activeValue || props.values[0],
|
activeValue: get(props, 'activeValue') || props.values[0],
|
||||||
activeIndex: props.values.indexOf(props.activeValue) || 0,
|
activeIndex: get(props, 'values', '').indexOf(get(props, 'activeValue')) || 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +53,7 @@ export default class ScaleSliderView extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { LRpadding, values, day } = this.props;
|
const { LRpadding, values } = this.props;
|
||||||
const { activeIndex } = this.state;
|
const { activeIndex } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -62,8 +63,8 @@ export default class ScaleSliderView extends Component {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<MultiSlider
|
<MultiSlider
|
||||||
trackStyle={{ backgroundColor: '#bdc3c7' }}
|
trackStyle={styles.track}
|
||||||
selectedStyle={{ backgroundColor: '#357ce6' }}
|
selectedStyle={styles.selected}
|
||||||
sliderLength={Dimensions.get('window').width - LRpadding * 2}
|
sliderLength={Dimensions.get('window').width - LRpadding * 2}
|
||||||
onValuesChange={this._valueChange}
|
onValuesChange={this._valueChange}
|
||||||
values={[activeIndex + 1]}
|
values={[activeIndex + 1]}
|
||||||
|
@ -2,9 +2,9 @@ import EStyleSheet from 'react-native-extended-stylesheet';
|
|||||||
|
|
||||||
export default EStyleSheet.create({
|
export default EStyleSheet.create({
|
||||||
optionsWrapper: {
|
optionsWrapper: {
|
||||||
backgroundColor: 'white',
|
backgroundColor: '$white',
|
||||||
borderTopWidth: 0,
|
borderTopWidth: 0,
|
||||||
borderColor: '#000',
|
borderColor: '$black',
|
||||||
left: 0,
|
left: 0,
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
right: 0,
|
right: 0,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React from 'react';
|
||||||
import { TextInput } from 'react-native';
|
import { TextInput } from 'react-native';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
@ -6,14 +6,12 @@ import { connect } from 'react-redux';
|
|||||||
import styles from './textInputStyles';
|
import styles from './textInputStyles';
|
||||||
|
|
||||||
const TextInputView = ({ isDarkTheme, innerRef, ...props }) => (
|
const TextInputView = ({ isDarkTheme, innerRef, ...props }) => (
|
||||||
<Fragment>
|
<TextInput
|
||||||
<TextInput
|
style={styles.input}
|
||||||
style={styles.input}
|
ref={innerRef}
|
||||||
ref={innerRef}
|
keyboardAppearance={isDarkTheme ? 'dark' : 'light'}
|
||||||
keyboardAppearance={isDarkTheme ? 'dark' : 'light'}
|
{...props}
|
||||||
{...props}
|
/>
|
||||||
/>
|
|
||||||
</Fragment>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable no-unused-vars */
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Alert } from 'react-native';
|
import { Alert } from 'react-native';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
@ -116,7 +115,7 @@ class PointsContainer extends Component {
|
|||||||
this.setState({ userPoints, balance });
|
this.setState({ userPoints, balance });
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
Alert.alert(err);
|
Alert.alert(err.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
await getUserPoints(username)
|
await getUserPoints(username)
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
import { Alert } from 'react-native';
|
import { Alert } from 'react-native';
|
||||||
// import { Client, PrivateKey } from 'dsteem';
|
|
||||||
import ePointApi from '../../config/ePoint';
|
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 = '') =>
|
export const userActivity = (us, ty, bl = '', tx = '') =>
|
||||||
new Promise(resolve => {
|
new Promise(resolve => {
|
||||||
const params = { us, ty };
|
const params = { us, ty };
|
||||||
|
Loading…
Reference in New Issue
Block a user