36 lines
1007 B
JavaScript
36 lines
1007 B
JavaScript
import { StatusBar } from 'expo-status-bar';
|
|
import React, { useEffect, useState } from 'react';
|
|
import { StyleSheet, Text, View, TextInput, SafeAreaView } from 'react-native';
|
|
import API from './../API.js';
|
|
import LoginForm from './../components/Login.js';
|
|
|
|
export default function App({navigation, route}) {
|
|
useEffect(async () => {
|
|
let r = await API.isLoggedIn();
|
|
if(r) navigation.navigate('Feed')
|
|
}, []);
|
|
|
|
return (
|
|
<PaperProvider settings={{
|
|
icon: props => <AwesomeIcon {...props} />,
|
|
}}>
|
|
<SafeAreaView style={styles.container}>
|
|
<Text>EMI Social LOGO</Text>
|
|
<LoginForm />
|
|
<StatusBar style="auto" />
|
|
</SafeAreaView>
|
|
</PaperProvider>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
marginTop: 25,
|
|
paddingTop: 10,
|
|
backgroundColor: "#edf2f7"
|
|
},
|
|
});
|