-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
26 lines (23 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
import React, { useState } from 'react';
import { SafeAreaView, StatusBar } from 'react-native';
import SignInForm from './src/auth/SignInForm';
import Map from './src/maps/Map';
import { base, colors } from './src/utils/base';
import { DismissKeyboard } from './src/utils/helpers';
import auth from '@react-native-firebase/auth';
const App = () => {
const [isAuthenticated, setIsAuthenticated] = useState<boolean>(!!auth().currentUser?.email);
return (
<DismissKeyboard>
<SafeAreaView style={[base.bg, base.flex]}>
<StatusBar barStyle={'dark-content'} backgroundColor={colors.white} />
{isAuthenticated ? (
<Map setIsAuthenticated={setIsAuthenticated} />
) : (
<SignInForm setIsAuthenticated={setIsAuthenticated} />
)}
</SafeAreaView>
</DismissKeyboard>
);
};
export default App;