-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
84 lines (81 loc) · 2.85 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
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
78
79
80
81
82
83
84
import {TouchableOpacity} from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import HomeScreen from "./screens/HomeScreen";
import {MaterialIcons} from "@expo/vector-icons";
import React from "react";
import {theme} from "./styles/theme";
import {RootStackParamList} from "./types/navigation";
import AudioScreen from "./screens/AudioScreen";
import RecordScreen from "./screens/RecordScreen";
import { RecoilRoot} from 'recoil';
import {QueryClient, QueryClientProvider} from "react-query";
const Stack = createNativeStackNavigator<RootStackParamList>();
const queryClient = new QueryClient();
export default function App() {
return (
<RecoilRoot>
<QueryClientProvider client={queryClient}>
<NavigationContainer>
<Stack.Navigator screenOptions={({ navigation }) => {
return {
contentStyle: {
backgroundColor: theme.background.primary,
},
animation: 'slide_from_left',
headerLeft: () => (
<TouchableOpacity onPress={() => navigation.goBack()}>
<MaterialIcons name="keyboard-arrow-left" size={30} color={theme.text.primary} />
</TouchableOpacity>
)
};
}}>
<Stack.Screen
name="HomeScreen"
component={HomeScreen}
options={{
headerShown: false,
headerStyle: {
backgroundColor: theme.background.secondary,
},
headerTransparent: false,
headerTitle: 'Home',
headerTitleStyle: {
color: theme.text.primary,
fontWeight: '700'
}
}}/>
<Stack.Screen
name="AudioScreen"
component={AudioScreen}
options={{
headerStyle: {
backgroundColor: theme.background.secondary,
},
headerTransparent: false,
headerTitle: 'Audio',
headerTitleStyle: {
color: theme.text.primary,
fontWeight: '700'
}
}}/>
<Stack.Screen
name="RecordScreen"
component={RecordScreen}
options={{
headerStyle: {
backgroundColor: theme.background.secondary,
},
headerTransparent: false,
headerTitle: 'Audio',
headerTitleStyle: {
color: theme.text.primary,
fontWeight: '700'
}
}}/>
</Stack.Navigator>
</NavigationContainer>
</QueryClientProvider>
</RecoilRoot>
);
}