-
Notifications
You must be signed in to change notification settings - Fork 4
/
App.tsx
53 lines (44 loc) · 1.36 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
import { LogBox, StyleSheet } from "react-native";
import { SystemBars, SystemBarsProps } from "react-native-edge-to-edge";
import { DefaultTheme, Theme } from "@react-navigation/native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { Navigation } from "./src/navigation";
import { Playground } from "./src/components/Playground";
import "@/audio";
import { COLORS } from "@/config";
import { useAppLifecycleAudioManager } from "@/hooks";
// I am aware of the consequences of this issue but I pass non-serializable
// values to screens I will never deep link to so it is fine
LogBox.ignoreLogs([
"Non-serializable values were found in the navigation state",
]);
const theme: Theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
background: COLORS["neutral/950"],
card: COLORS["neutral/950"],
text: COLORS.white,
primary: COLORS.white,
},
};
const hiddenProps: SystemBarsProps["hidden"] = {
navigationBar: true,
statusBar: true,
};
function App() {
const renderGame = true;
useAppLifecycleAudioManager();
return (
<GestureHandlerRootView style={styles.GHRootView}>
{renderGame ? <Navigation theme={theme} /> : <Playground />}
<SystemBars hidden={hiddenProps} />
</GestureHandlerRootView>
);
}
const styles = StyleSheet.create({
GHRootView: {
flex: 1,
},
});
export default App;