59 lines
2.1 KiB
JavaScript
59 lines
2.1 KiB
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';
|
|
import { Provider as PaperProvider } from 'react-native-paper';
|
|
import AwesomeIcon from 'react-native-vector-icons/FontAwesome';
|
|
import { NavigationContainer } from '@react-navigation/native';
|
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
import Login from "./Views/Login.js"
|
|
import Feed from "./Views/Feed.js"
|
|
import Profile from "./Views/Profile.js"
|
|
import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
|
|
|
|
const Tab = createMaterialBottomTabNavigator();
|
|
|
|
const Stack = createNativeStackNavigator();
|
|
|
|
export default function App() {
|
|
return (
|
|
<NavigationContainer>
|
|
<Tab.Navigator initialRouteName="Home"
|
|
activeColor="#f0edf6"
|
|
inactiveColor="#3e2465"
|
|
barStyle={{ backgroundColor: '#694fad' }}>
|
|
<Tab.Screen
|
|
name="Feed"
|
|
component={Feed}
|
|
options={{
|
|
tabBarLabel: 'Home',
|
|
tabBarIcon: ({ color }) => (
|
|
<AwesomeIcon name="home" color={color} size={26} />
|
|
),
|
|
tabBarBadge: false
|
|
}}
|
|
listeners={({ navigation, route }) => ({
|
|
tabPress: e => {
|
|
navigation.navigate('Feed')
|
|
},
|
|
})}
|
|
/>
|
|
<Tab.Screen name="Profile" component={Profile} />
|
|
<Tab.Screen name="Logou" component={Login} />
|
|
</Tab.Navigator>
|
|
</NavigationContainer>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
marginTop: 25,
|
|
paddingTop: 10,
|
|
backgroundColor: "#edf2f7"
|
|
},
|
|
});
|