Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/mobile/App.js
- This file was added.
import React from 'react'; | |||||
import {WebView} from 'react-native-webview'; | |||||
import {ActivityIndicator, StyleSheet, View, Image} from 'react-native'; | |||||
import LogoSrc from './assets/cashtab.png'; | |||||
const styles = StyleSheet.create({ | |||||
container: { | |||||
flex: 1, | |||||
height: '100%', | |||||
}, | |||||
loadingContainer: { | |||||
justifyContent: 'center', | |||||
alignItems: 'center', | |||||
height: '100%', | |||||
}, | |||||
logo: { | |||||
marginBottom: 50, | |||||
width: 180, | |||||
height: 40, | |||||
}, | |||||
}); | |||||
const LoadingIndicatorView = () => ( | |||||
<View style={styles.loadingContainer}> | |||||
<Image source={LogoSrc} style={styles.logo} /> | |||||
<ActivityIndicator color="rgb(255, 141, 0)" size="large" /> | |||||
</View> | |||||
); | |||||
const App: () => React$Node = () => { | |||||
return ( | |||||
<View style={styles.container}> | |||||
<WebView | |||||
originWhitelist={['*']} | |||||
source={{uri: 'https://cashtabapp.com'}} | |||||
renderLoading={LoadingIndicatorView} | |||||
startInLoadingState={true} | |||||
/> | |||||
</View> | |||||
); | |||||
}; | |||||
export default App; |