This repository was archived by the owner on Feb 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
77 lines (70 loc) · 2.39 KB
/
App.tsx
File metadata and controls
77 lines (70 loc) · 2.39 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { PaperProvider } from "react-native-paper";
import { QueryClient, QueryClientProvider } from "react-query";
import axios from "axios";
import { API_URL } from "@env";
import Start from "./src/screens/Start";
import SignUp from "./src/screens/SignUp";
import SignIn from "./src/screens/SignIn";
import Main from "./src/screens/Main";
import Notification from "./src/screens/Notification";
import { RootStackParamList } from "./src/types";
import { theme } from "./src/core/theme";
import { RecoilRoot } from "recoil";
axios.defaults.baseURL = API_URL;
axios.defaults.timeout = 10000;
// axios.defaults.withCredentials = true;
const Stack = createNativeStackNavigator<RootStackParamList>();
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
},
},
});
const App = () => {
// console.log(process.env.REACT_APP_API_URL, axios.defaults.baseURL);
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<QueryClientProvider client={queryClient}>
<PaperProvider theme={theme}>
<RecoilRoot>
<NavigationContainer>
<Stack.Navigator initialRouteName="Start">
<Stack.Screen
name="Start"
options={{ title: "" }}
component={Start}
/>
<Stack.Screen
name="SignUp"
options={{ title: "" }}
component={SignUp}
/>
<Stack.Screen
name="SignIn"
options={{ title: "" }}
component={SignIn}
/>
<Stack.Screen
name="Main"
options={{ title: "" }}
component={Main}
/>
<Stack.Screen
name="Notification"
options={{ title: "" }}
component={Notification}
/>
</Stack.Navigator>
</NavigationContainer>
</RecoilRoot>
</PaperProvider>
</QueryClientProvider>
</GestureHandlerRootView>
);
};
export default App;