aboutsummaryrefslogtreecommitdiff
path: root/App.tsx
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-05-12 20:04:58 +0530
committerAkshay Nair <phenax5@gmail.com>2024-09-29 16:16:39 +0530
commitdda041a9aebc23f7a0576fc4030d06c71fa370d2 (patch)
tree545016cf9df58395dfebc520f9e26dd802a2ffa6 /App.tsx
parentd87cea9ff2467f93be28533938dfc3a3e5c0c937 (diff)
downloaddaft-launcher-dda041a9aebc23f7a0576fc4030d06c71fa370d2.tar.gz
daft-launcher-dda041a9aebc23f7a0576fc4030d06c71fa370d2.zip
Add draggable favorite apps list
Diffstat (limited to '')
-rw-r--r--App.tsx31
1 files changed, 17 insertions, 14 deletions
diff --git a/App.tsx b/App.tsx
index 6c2c0dc..c6b5159 100644
--- a/App.tsx
+++ b/App.tsx
@@ -4,6 +4,7 @@ import {InstalledApps} from 'react-native-launcher-kit';
import Swiper from 'react-native-swiper';
import {AppList} from './src/screens/AppList';
import {Home} from './src/screens/Home';
+import {GestureHandlerRootView} from 'react-native-gesture-handler';
function App(): React.JSX.Element {
const [apps, setApps] = useState(() => InstalledApps.getSortedApps());
@@ -11,21 +12,23 @@ function App(): React.JSX.Element {
const [screenIndex, setScreenIndex] = useState(0);
return (
- <SafeAreaView className="flex flex-1 bg-slate-100 dark:bg-black">
- <Swiper
- autoplay={false}
- horizontal
- loop={false}
- loadMinimal
- dot={<></>}
- activeDot={<></>}
- index={screenIndex}
- onIndexChanged={setScreenIndex}>
- <Home />
+ <GestureHandlerRootView>
+ <SafeAreaView className="flex flex-1 bg-slate-100 dark:bg-black">
+ <Swiper
+ autoplay={false}
+ horizontal
+ loop={false}
+ loadMinimal
+ dot={<></>}
+ activeDot={<></>}
+ index={screenIndex}
+ onIndexChanged={setScreenIndex}>
+ <Home apps={apps} />
- <AppList apps={apps} screenIndex={screenIndex} />
- </Swiper>
- </SafeAreaView>
+ <AppList apps={apps} screenIndex={screenIndex} />
+ </Swiper>
+ </SafeAreaView>
+ </GestureHandlerRootView>
);
}