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(() => { getData = async () => { let r = await API.isLoggedIn(); if (r) { await API.logout(); navigation.navigate('Login') } } getData(); return () => { } }, []); return ( {"<- Not an EMI family memeber?"} ); } const styles = StyleSheet.create({ container: { flex: 1, }, });