Merge pull request #1329 from esteemapp/new/currency-endpoint

added new api enhanced settings screen
This commit is contained in:
Feruz M 2019-11-29 20:40:14 +02:00 committed by GitHub
commit b09fbd2a65
2 changed files with 229 additions and 246 deletions

View File

@ -4,10 +4,10 @@ import imageApi from '../../config/imageApi';
import serverList from '../../config/serverListApi'; import serverList from '../../config/serverListApi';
import { jsonStringify } from '../../utils/jsonUtils'; import { jsonStringify } from '../../utils/jsonUtils';
import bugsnag from '../../config/bugsnag'; import bugsnag from '../../config/bugsnag';
//market-data/currency-rate/USD/estm
export const getCurrencyRate = currency => export const getCurrencyRate = currency =>
api api
.get(`/currencyRate/${currency.toUpperCase()}/steem`) .get(`/market-data/currency-rate/${currency.toUpperCase()}/steem`)
.then(resp => resp.data) .then(resp => resp.data)
.catch(err => { .catch(err => {
console.log('err :', err); console.log('err :', err);

View File

@ -1,5 +1,5 @@
/* eslint-disable react/jsx-wrap-multilines */ /* eslint-disable react/jsx-wrap-multilines */
import React, { PureComponent, Fragment } from 'react'; import React, { Fragment } from 'react';
import { ScrollView, View, RefreshControl } from 'react-native'; import { ScrollView, View, RefreshControl } from 'react-native';
import { injectIntl } from 'react-intl'; import { injectIntl } from 'react-intl';
@ -17,22 +17,7 @@ import { BasicHeader, SettingsItem, CollapsibleCard } from '../../../components'
// Styles // Styles
import styles from './settingsStyles'; import styles from './settingsStyles';
class SettingsScreen extends PureComponent { const SettingsScreen = ({
/* Props
* ------------------------------------------------
* @prop { type } name - Description....
*/
constructor(props) {
super(props);
this.state = {};
}
// Component Life Cycles
// Component Functions
// TODO: REFACTOR ME !
render() {
const {
handleOnChange, handleOnChange,
intl, intl,
isDarkTheme, isDarkTheme,
@ -53,8 +38,7 @@ class SettingsScreen extends PureComponent {
voteNotification, voteNotification,
handleOnButtonPress, handleOnButtonPress,
isLoading, isLoading,
} = this.props; }) => {
return ( return (
<Fragment> <Fragment>
<BasicHeader <BasicHeader
@ -272,6 +256,5 @@ class SettingsScreen extends PureComponent {
</ScrollView> </ScrollView>
</Fragment> </Fragment>
); );
} };
}
export default injectIntl(SettingsScreen); export default injectIntl(SettingsScreen);