aboutsummaryrefslogtreecommitdiff
path: root/App.tsx
blob: 1b42456e4c5f23b1deabd664b66728c1a40868e6 (plain) (blame)
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
import React, {useState} from 'react';
import {SafeAreaView, Text, View} from 'react-native';
import {InstalledApps} from 'react-native-launcher-kit';
import Swiper from 'react-native-swiper';
import {AppList} from './src/screens/AppList';

function App(): React.JSX.Element {
  const [apps, setApps] = useState(() => InstalledApps.getSortedApps());
  const refreshApps = () => setApps(InstalledApps.getSortedApps());
  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}>
        <View>
          <Text>Wow</Text>
        </View>

        <AppList apps={apps} screenIndex={screenIndex} />
      </Swiper>
    </SafeAreaView>
  );
}

export default App;