Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/mobile/App.js
- This file was added.
import React from 'react'; | |||||
import { StyleSheet, View, ActivityIndicator, Image } from 'react-native'; | |||||
import { WebView } from 'react-native-webview'; | |||||
import LogoSrc from './assets/logo.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 = () => { | |||||
return ( | |||||
<View style={styles.container}> | |||||
<WebView | |||||
originWhitelist={['*']} | |||||
source={{ uri: 'https://cashtabapp.com' }} | |||||
deadalnix: Why does this need to load the js from a web page when it could have it on hand? That does not… | |||||
Unknown Object (User)Unsubmitted Not Done Inline Actions1PiHuP26V6DiutrdMuycywBXbRcybDKami Unknown Object (User): 1PiHuP26V6DiutrdMuycywBXbRcybDKami | |||||
renderLoading={LoadingIndicatorView} | |||||
startInLoadingState={true} | |||||
/> | |||||
</View> | |||||
); | |||||
}; | |||||
export default App; |
Why does this need to load the js from a web page when it could have it on hand? That does not seems to make a lot of sense as a strategy to me.