aboutsummaryrefslogtreecommitdiff
path: root/App.tsx
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-09-29 13:19:11 +0530
committerAkshay Nair <phenax5@gmail.com>2024-09-29 16:16:40 +0530
commitbac973fb3d933c383cc69612c7ffc45ece837dde (patch)
treeffe6dc906c4108dd38d24be69f89a6c5e3a50347 /App.tsx
parentbcf8a0ce1a3f4ccab01737741a22ecaf968daaff (diff)
downloaddaft-launcher-bac973fb3d933c383cc69612c7ffc45ece837dde.tar.gz
daft-launcher-bac973fb3d933c383cc69612c7ffc45ece837dde.zip
Switch to jotai atom with storage + suspense for favorites list
Diffstat (limited to 'App.tsx')
-rw-r--r--App.tsx22
1 files changed, 12 insertions, 10 deletions
diff --git a/App.tsx b/App.tsx
index dd4cdd8..76ea9f1 100644
--- a/App.tsx
+++ b/App.tsx
@@ -1,18 +1,20 @@
-import React from 'react';
-import {SafeAreaView} from 'react-native';
+import React, {Suspense} from 'react';
+import {SafeAreaView, View} from 'react-native';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
-import {View} from './src/View';
+import {AppView} from './src/AppView';
import {Provider as JotaiProvider} from 'jotai';
const App: React.FC = () => {
return (
- <JotaiProvider>
- <GestureHandlerRootView>
- <SafeAreaView className="flex flex-1 bg-black text-slate-200">
- <View />
- </SafeAreaView>
- </GestureHandlerRootView>
- </JotaiProvider>
+ <Suspense fallback={<View className="flex flex-1 bg-black" />}>
+ <JotaiProvider>
+ <GestureHandlerRootView>
+ <SafeAreaView className="flex flex-1 bg-black text-slate-200">
+ <AppView />
+ </SafeAreaView>
+ </GestureHandlerRootView>
+ </JotaiProvider>
+ </Suspense>
);
};