-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
33 lines (30 loc) · 862 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { StyleSheet, View, StatusBar } from 'react-native';
import Login from './src/screens/login';
import Home from './src/screens/home';
import Loja from './src/screens/loja';
import { useState } from 'react';
import colors from "./src/styles/colors";
export default function App() {
const [user, setUser] = useState();
const [loja, setLoja] = useState();
return (
<View style={styles.container}>
<StatusBar barStyle="light-content" backgroundColor={colors.mainGrey} />
{!user ? (
<Login setUser={setUser} />
) : !loja ? (
<Home setUser={setUser} setLoja={setLoja} />
) : (
<Loja loja={loja} setLoja={setLoja} />
)}
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});