xref: /MusicFree/src/pages/home/index.tsx (revision b882a19d884fffa32f7c8cef31652b909dceaa0f)
1import React from 'react';
2import {StyleSheet} from 'react-native';
3
4import NavBar from './components/navBar';
5import Operations from './components/operations';
6import MySheets from './components/mySheets';
7import MusicBar from '@/components/musicBar';
8import {Divider} from 'react-native-paper';
9import {createDrawerNavigator} from '@react-navigation/drawer';
10import HomeDrawer from './components/drawer';
11import {SafeAreaView} from 'react-native-safe-area-context';
12import rpx from '@/utils/rpx';
13import StatusBar from '@/components/base/statusBar';
14
15function Home() {
16    return (
17        <SafeAreaView style={styles.appWrapper}>
18            <StatusBar backgroundColor="transparent" />
19            <NavBar />
20            <Divider />
21            <Operations />
22            <MySheets />
23            <MusicBar />
24        </SafeAreaView>
25    );
26}
27
28const LeftDrawer = createDrawerNavigator();
29export default function App() {
30    return (
31        <LeftDrawer.Navigator
32            screenOptions={{
33                headerShown: false,
34                drawerStyle: {
35                    width: rpx(600),
36                },
37            }}
38            initialRouteName="HOME-MAIN"
39            drawerContent={props => <HomeDrawer {...props} />}>
40            <LeftDrawer.Screen name="HOME-MAIN" component={Home} />
41        </LeftDrawer.Navigator>
42    );
43}
44
45const styles = StyleSheet.create({
46    appWrapper: {
47        flexDirection: 'column',
48        height: '100%',
49    },
50});
51