aboutsummaryrefslogtreecommitdiff
path: root/App.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'App.tsx')
-rw-r--r--App.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/App.tsx b/App.tsx
index 76ea9f1..08886a0 100644
--- a/App.tsx
+++ b/App.tsx
@@ -1,10 +1,16 @@
-import React, {Suspense} from 'react';
-import {SafeAreaView, View} from 'react-native';
+import React, {Suspense, useEffect} from 'react';
+import {BackHandler, SafeAreaView, View} from 'react-native';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {AppView} from './src/AppView';
import {Provider as JotaiProvider} from 'jotai';
const App: React.FC = () => {
+ // Disable back button
+ useEffect(() => {
+ const sub = BackHandler.addEventListener('hardwareBackPress', () => true);
+ return () => sub.remove();
+ }, []);
+
return (
<Suspense fallback={<View className="flex flex-1 bg-black" />}>
<JotaiProvider>