Feed with post views working

This commit is contained in:
aeroreyna
2022-03-06 20:31:50 -08:00
parent 352871786b
commit b948927e4c
6 changed files with 167 additions and 28 deletions

11
App.js
View File

@@ -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"
},
});