1import React from 'react'; 2import {StyleSheet} from 'react-native'; 3import rpx from '@/utils/rpx'; 4import settingTypes from './settingTypes'; 5import {SafeAreaView} from 'react-native-safe-area-context'; 6import StatusBar from '@/components/base/statusBar'; 7import SimpleAppBar from '@/components/base/simpleAppBar'; 8import {useParams} from '@/entry/router'; 9 10export default function Setting() { 11 const {type} = useParams<'setting'>(); 12 const settingItem = settingTypes[type]; 13 14 return ( 15 <SafeAreaView style={style.wrapper}> 16 <StatusBar /> 17 {settingItem.showNav === false ? null : ( 18 <SimpleAppBar title={settingItem?.title} /> 19 )} 20 <settingItem.component /> 21 </SafeAreaView> 22 ); 23} 24 25const style = StyleSheet.create({ 26 wrapper: { 27 width: rpx(750), 28 flex: 1, 29 }, 30 appbar: { 31 shadowColor: 'transparent', 32 backgroundColor: '#2b333eaa', 33 }, 34 header: { 35 backgroundColor: 'transparent', 36 shadowColor: 'transparent', 37 }, 38}); 39