-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
45 lines (40 loc) · 1.31 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from "react";
import { NavigationContainer } from "@react-navigation/native"; // 전체 네비게이션을 감싸는 컨테이너 불러오기
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { RecoilRoot } from "recoil";
import { useFonts } from "expo-font";
import type { NativeStackNavigationProp } from "@react-navigation/native-stack";
import { TextEncoder } from "text-encoding";
import { SafeAreaProvider } from "react-native-safe-area-context";
import Navigator from "./src/screens/Navigator";
new TextEncoder();
const queryClient = new QueryClient();
export type RootStackParamList = {
Profile: undefined;
SignUp: undefined;
Home: undefined;
Login: undefined;
ChatRoom: { roomId: number } | undefined;
Tabs: undefined;
Splash: undefined;
};
export type NavigationProps = NativeStackNavigationProp<RootStackParamList>;
export default function App() {
const [fontsLoaded] = useFonts({
"Gaegu-Bold": require("./assets/fonts/Gaegu-Bold.ttf"),
});
if (!fontsLoaded) {
return null;
}
return (
<SafeAreaProvider>
<NavigationContainer>
<QueryClientProvider client={queryClient}>
<RecoilRoot>
<Navigator />
</RecoilRoot>
</QueryClientProvider>
</NavigationContainer>
</SafeAreaProvider>
);
}