Commit 8f442fda authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

bb

parent cb8ad49b
...@@ -11,21 +11,15 @@ import * as Localization from 'expo-localization'; ...@@ -11,21 +11,15 @@ import * as Localization from 'expo-localization';
import i18n from 'i18n-js'; import i18n from 'i18n-js';
import en from './lib/en'; import en from './lib/en';
import id from './lib/id'; import id from './lib/id';
import React, {useState } from 'react'; import React, {useEffect,useState } from 'react';
import { Text, View } from 'react-native'; import { Text, View } from 'react-native';
import { AppLoading } from 'expo'; import { AppLoading } from 'expo';
import * as Font from 'expo-font'; import * as Font from 'expo-font';
let customFonts = {
function useFonts(fontMap) { 'Gotham-Black': require('./assets/font/Gotham-Bold-700.otf'),
let [fontsLoaded, setFontsLoaded] = useState(false); 'Gotham-SemiBoldItalic': require('./assets/font/Gotham-BoldItalic-400.otf')
(async () => { };
await Font.loadAsync(fontMap);
setFontsLoaded(true);
})();
return [fontsLoaded];
}
export const lang = i18n.translations = { export const lang = i18n.translations = {
en:en, en:en,
...@@ -46,13 +40,30 @@ const store = createStore(persistReducers); ...@@ -46,13 +40,30 @@ const store = createStore(persistReducers);
const persistor = persistStore(store) const persistor = persistStore(store)
i18n.locale = Localization.locale; i18n.locale = Localization.locale;
export default function App() { export default function App() {
return ( const [fontsLoaded, setfontsLoaded] = useState(false)
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}> const loadFont = async () => {
<NavigationContainer> await Font.loadAsync(customFonts);
<Auth /> };
</NavigationContainer>
</PersistGate> useEffect(() => {
</Provider> console.log('===> Did Mount');
); loadFont().then(_ => {
setfontsLoaded(true);
})
}, [])
if (!fontsLoaded) {
return <AppLoading />;
} else {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<NavigationContainer>
<Auth />
</NavigationContainer>
</PersistGate>
</Provider>
);
}
} }
To learn more about the font family and its license, visit https://www.fontmirror.com/gotham-bold
\ No newline at end of file
This diff is collapsed.
...@@ -185,7 +185,7 @@ class Login extends React.Component { ...@@ -185,7 +185,7 @@ class Login extends React.Component {
render() { render() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<View style={{ flex: 2 }}> <View style={{ flex: 1 }}>
<View style={{ flex: 1, flexDirection: 'row' }}> <View style={{ flex: 1, flexDirection: 'row' }}>
<View style={{ flex: 3 }}> <View style={{ flex: 3 }}>
<Image <Image
...@@ -195,34 +195,48 @@ class Login extends React.Component { ...@@ -195,34 +195,48 @@ class Login extends React.Component {
</View> </View>
<View style={{ flex: 6 }}> <View style={{ flex: 6 }}>
<Image <Image
style={{ height: 150, width: 150, alignSelf: 'center', top: '20%' }} style={{ height: 150, width: 150, alignSelf: 'center', top: '20%', }}
source={require('../assets/excelso.png')} source={require('../assets/excelso.png')}
/> />
</View> </View>
</View> </View>
</View> </View>
<View style={{ flex: 1, marginRight: 20, marginLeft: 20 }}> <View style={{ flex: 1, marginRight: 20, marginLeft: 20 }}>
<View style={{ flex: 1, marginRight: 20, marginLeft: 20 }}> <View style={{ marginRight: 20, marginLeft: 20,marginBottom: 10 }}>
<Text style={{color:'white',textAlign:'center'}}>Email</Text> <Text style={{ color: 'white', textAlign: 'center' }}>Email</Text>
<TextInput <TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 20 }} style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 20, margin:5 }}
onChangeText={(email) => this.setState({ email })} onChangeText={(email) => this.setState({ email })}
autoCapitalize="none" autoCapitalize="none"
value={this.state.email} value={this.state.email}
keyboardType='email-address' keyboardType='email-address'
/> />
</View> </View>
<View style={{ flex: 1, marginRight: 20, marginLeft: 20 }}> <View style={{ marginRight: 20, marginLeft: 20 }}>
<Text style={{color:'white',textAlign:'center'}}>Password</Text> <Text style={{ color: 'white', textAlign: 'center' }}>Password</Text>
<TextInput <TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 20 }} style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 20, margin:5 }}
onChangeText={password => this.setState({ password })} onChangeText={password => this.setState({ password })}
value={this.state.password} value={this.state.password}
secureTextEntry={true} secureTextEntry={true}
/> />
</View> </View>
<View style={{ height: 50, backgroundColor: '#CFB368', marginRight: 70, marginLeft: 70, borderRadius: 20 ,margin:15 }}>
<Text style={{textAlign:'center',alignSelf:'center',top: 15, fontWeight:'bold'}}>LOGIN</Text>
</View>
</View> </View>
<View style={{ flex: 1, }}></View> <View style={{ flex: 1 }}>
<View style={{justifyContent:'center',margin:10,}}>
<Text style={{ color: 'white', textAlign: 'center',fontSize: 20, fontFamily:'Ghotam-Black'}}>Register</Text>
<Text style={{ color: 'white', textAlign: 'center',fontSize:20 }}>Forgot Password</Text>
</View>
<View style={{justifyContent:'center',margin:10,}}>
<Text style={{ color: 'white', textAlign: 'center' }}>Dengan Login atau Register, Kamu menyetujui aturan </Text>
<Text style={{ color: 'white', textAlign: 'center' }}>Panduan Layanan dan Kebijakan Privasi Kami </Text>
</View>
</View>
</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