Feed with post views working
This commit is contained in:
11
App.js
11
App.js
@@ -4,6 +4,8 @@ import { StyleSheet, Text, View, TextInput, SafeAreaView } from 'react-native';
|
||||
import API from './API.js';
|
||||
import LoginForm from './components/Login.js';
|
||||
import Feed from './components/Feed.js';
|
||||
import { Provider as PaperProvider } from 'react-native-paper';
|
||||
import AwesomeIcon from 'react-native-vector-icons/FontAwesome';
|
||||
|
||||
export default function App() {
|
||||
let [isLoggedIn, setIsLoggedIn] = useState(false);
|
||||
@@ -14,21 +16,26 @@ export default function App() {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<PaperProvider settings={{
|
||||
icon: props => <AwesomeIcon {...props} />,
|
||||
}}>
|
||||
<SafeAreaView style={styles.container}>
|
||||
<Text>EMI Social LOGO</Text>
|
||||
{!isLoggedIn && <LoginForm />}
|
||||
{isLoggedIn && <Feed />}
|
||||
<StatusBar style="auto" />
|
||||
</SafeAreaView>
|
||||
</PaperProvider>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#fff',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
marginTop: 30,
|
||||
marginTop: 25,
|
||||
paddingTop: 10,
|
||||
backgroundColor: "#edf2f7"
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user