-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
48 lines (43 loc) · 2.05 KB
/
App.js
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
39
40
41
42
43
44
45
46
47
import React, { useEffect, useState } from 'react';
import { NavigationContainer, useNavigation } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import LoginUser from './components/auth/login_user';
import SplashScreen from './components/splash_screen';
import CarouselComponent from './components/image_coursel';
import AppCarousel from './components/image_coursel';
import OnboardingCarousel from './components/image_coursel';
import AuthScreen from './components/auth/login_user';
import Home from './components/home';
import Tab_Navigation from './components/tab_navigation';
import ChatScreen from './components/chat_screen';
import Profile from './components/profile';
import ServiceProviderLogin from './components/serviceprovider/auth/serviceproviderlogin';
import ServiceProviderDashboard from './components/serviceprovider/serviceprovider_dashboard';
import Cnic_Verification from './components/serviceprovider/auth/cnic_verifciation';
const Stack = createNativeStackNavigator();
export default function App() {
const [issplashshow,setissplashshow]=useState(true)
useEffect(()=>{
setTimeout(()=>{
setissplashshow(false)
},3000)
})
return (
<NavigationContainer>
<Stack.Navigator screenOptions={{ headerShown: false }}>
{issplashshow ? (
<Stack.Screen name="splash_screen" component={SplashScreen} />
) : (
<Stack.Screen name="image_coursel" component={OnboardingCarousel} />
)}
<Stack.Screen name="login_user" component={AuthScreen}/>
<Stack.Screen name="profile" component={Profile}/>
<Stack.Screen name="serviceproviderlogin" component={ServiceProviderLogin}/>
<Stack.Screen name="chat_screen" component={ChatScreen} />
<Stack.Screen name="tab_navigation" component={Tab_Navigation}/>
<Stack.Screen name="serviceprovider_dashboard" component={ServiceProviderDashboard}/>
<Stack.Screen name="cnic_verifciation" component={Cnic_Verification}/>
</Stack.Navigator>
</NavigationContainer>
);
}