view.js
804 Bytes
/**
* @author sheng
* @description 功能介绍详情页
* @date 2020/09/03
*/
import React, { useLayoutEffect } from 'react'
import { View, Text } from 'react-native'
import { styles } from './style'
import { Icons } from '../../../assets/icons'
import { setUnit } from '../../../libs/utils'
const Page = ({route, navigation }) => {
useLayoutEffect(() => {
navigation.setOptions({
headerLeft: () => (
<Icons
name='guanbi'
color='#555'
size={setUnit(32)}
style={{ paddingHorizontal: setUnit(24) }}
onPress={() => navigation.goBack()}
/>
)
})
}, [navigation])
return (
<View style={styles.container}>
<Text style={styles.desc}>{route.params?.content}</Text>
</View>
)
}
export default Page