-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
38 lines (30 loc) · 1.16 KB
/
App.tsx
File metadata and controls
38 lines (30 loc) · 1.16 KB
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
34
35
36
37
38
import React, { useState } from 'react';
import { SafeAreaView, StatusBar } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import ChatScreen from './screens/ChatScreen';
import AyobotIntro from './components/AyobotIntro';
import SignupScreen from './screens/SignupScreen';
import SigninScreen from './screens/SigninScreen';
const Stack = createStackNavigator();
export default function App() {
const [showIntro, setShowIntro] = useState(true);
if (showIntro){
return (
<SafeAreaView style={{ flex: 1, backgroundColor: '#0D1117' }}>
<StatusBar barStyle="light-content" />
<AyobotIntro onDone={() => setShowIntro(false)} />
</SafeAreaView>
);
}
return (
<NavigationContainer>
<StatusBar barStyle="light-content" />
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="Signup" component={SignupScreen} />
<Stack.Screen name="Chat" component={ChatScreen} />
<Stack.Screen name="Signin" component={SigninScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}