diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-09-29 13:19:11 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-09-29 16:16:40 +0530 |
| commit | bac973fb3d933c383cc69612c7ffc45ece837dde (patch) | |
| tree | ffe6dc906c4108dd38d24be69f89a6c5e3a50347 /App.tsx | |
| parent | bcf8a0ce1a3f4ccab01737741a22ecaf968daaff (diff) | |
| download | daft-launcher-bac973fb3d933c383cc69612c7ffc45ece837dde.tar.gz daft-launcher-bac973fb3d933c383cc69612c7ffc45ece837dde.zip | |
Switch to jotai atom with storage + suspense for favorites list
Diffstat (limited to '')
| -rw-r--r-- | App.tsx | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -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> ); }; |
