-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
27 lines (25 loc) · 680 Bytes
/
Copy pathApp.js
File metadata and controls
27 lines (25 loc) · 680 Bytes
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
import { StatusBar, StyleSheet, View } from "react-native";
import Connected from "./pages/Connected";
import Login from "./pages/Login";
import { useState } from "react";
import { pageType } from "./types/PageType";
export default function App() {
// TODO : add async storage
const [currentPage, setCurrentPage] = useState(pageType.LOGIN);
return (
<View style={Style.main}>
{currentPage === pageType.LOGIN ? (
<Login onLogin={(e) => setCurrentPage(e)} />
) : (
<Connected />
)}
</View>
);
}
const Style = StyleSheet.create({
main: {
//paddingTop: StatusBar.currentHeight,
width: "100%",
height: "100%",
},
});