Commit ccbdabcf authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

Merge branch 'master' of ssh://repo.cs.co.id:2222/wahyu/bahanoprek

# Conflicts:
#	view/MenuSelection.js
parents 3cf8e64b 22df3b8c
{ {
"expo": { "expo": {
"extra" : { "extra" : {
"buildNumber" : "109", "buildNumber" : "113",
"remarks": "" "remarks": ""
}, },
......
...@@ -382,7 +382,7 @@ class MenuSelection extends React.Component { ...@@ -382,7 +382,7 @@ class MenuSelection extends React.Component {
data={this.state.data_before_search} data={this.state.data_before_search}
renderItem={this.renderItem} renderItem={this.renderItem}
keyExtractor={item => item.id} keyExtractor={item => item.id}
// ref={(ref) => { this.flatListRef = ref; }} ref={(ref) => { this.flatListRef = ref; }}
initialNumToRender={5} initialNumToRender={5}
maxToRenderPerBatch={10} maxToRenderPerBatch={10}
windowSize={10} windowSize={10}
......
import Axios from 'axios'; import Axios from 'axios';
import React from 'react'; import React from 'react';
import { ScrollView, StyleSheet, Text, View, Image, StatusBar } from 'react-native'; import { ScrollView, StyleSheet, Text, View, Image, StatusBar, Clipboard } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler'; import { TouchableOpacity } from 'react-native-gesture-handler';
import HTML from 'react-native-render-html'; import HTML from 'react-native-render-html';
import { Collapse, CollapseHeader, CollapseBody, AccordionList } from 'accordion-collapse-react-native' import { Collapse, CollapseHeader, CollapseBody, AccordionList } from 'accordion-collapse-react-native'
import { getStatusBarHeight } from 'react-native-status-bar-height'; import { getStatusBarHeight } from 'react-native-status-bar-height';
import MyStatusBar from './MyStatusBar'; import MyStatusBar from './MyStatusBar';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Toast from 'react-native-tiny-toast';
class TopUpInfo extends React.Component { class TopUpInfo extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
...@@ -19,16 +20,20 @@ import { connect } from 'react-redux'; ...@@ -19,16 +20,20 @@ import { connect } from 'react-redux';
} }
componentDidMount() { componentDidMount() {
console.log("ii" + this.props.BASE_URL) // console.log("ii" + this.props.BASE_URL)
// console.log(this.props.BASE_URL + 'cms/v2/topup-info/' + this.props.session_id)
const statusBarHeight = getStatusBarHeight(); const statusBarHeight = getStatusBarHeight();
this.setState({ this.setState({
statusbar_height: statusBarHeight statusbar_height: statusBarHeight
}) })
Axios.get(this.props.BASE_URL+'cms/v2/list/topup-info').then(res => { Axios.get(this.props.BASE_URL + 'cms/v2/topup_info/' + this.props.session_id).then(res => {
let data = res.data; let data = res.data;
this.setState({ this.setState({
topup_info: data.contents topup_info: data.contents
}) })
}).catch(error => {
let response = error.response.data;
console.log(response.msg);
}) })
} }
...@@ -56,7 +61,13 @@ import { connect } from 'react-redux'; ...@@ -56,7 +61,13 @@ import { connect } from 'react-redux';
</View> </View>
</CollapseHeader> </CollapseHeader>
<CollapseBody style={{ marginHorizontal: 20 }}> <CollapseBody style={{ marginHorizontal: 20 }}>
<HTML html={item.content} tagsStyles={{ p: { fontFamily: 'Gotham-Light', marginTop: 8, marginBottom: 8, color: '#adadad' }, blockquote: { backgroundColor: "#f1f1f1", padding: 12, paddingBottom: 0, marginTop: 6, color: '#adadad' }, ul: { fontFamily: 'Gotham-Light', marginLeft: 0, color: '#adadad', paddingLeft: 0 }, li: { fontFamily: 'Gotham-Light', marginLeft: 0, color: '#adadad', paddingLeft: 0 } }} /> <HTML html={item.content}
tagsStyles={{ p: { fontFamily: 'Gotham-Light', marginTop: 8, marginBottom: 8, color: '#adadad' }, blockquote: { backgroundColor: "#f1f1f1", padding: 12, paddingBottom: 0, marginTop: 6, color: '#adadad' }, ul: { fontFamily: 'Gotham-Light', marginLeft: 0, color: '#adadad', paddingLeft: 0 }, li: { fontFamily: 'Gotham-Light', marginLeft: 0, color: '#adadad', paddingLeft: 0 } }}
onLinkPress={(event, href) => {
// console.log(href.replace('http://',''))
Clipboard.setString(href.replace('http://',''))
Toast.show('Copied To Clipboard')
}} />
</CollapseBody> </CollapseBody>
</Collapse> </Collapse>
</View> </View>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment