fixing nav for profile and cards in home screen mode

This commit is contained in:
balzack 2022-10-04 17:54:18 -07:00
parent 8a17592dcf
commit 01d82d1097

View File

@ -167,6 +167,13 @@ export function Session() {
detailNav.openDrawer(); detailNav.openDrawer();
}; };
const openProfile = () => {
profileNav.openDrawer();
}
const openCards = () => {
cardNav.openDrawer();
}
const conversation = useContext(ConversationContext); const conversation = useContext(ConversationContext);
useEffect(() => { useEffect(() => {
@ -186,11 +193,11 @@ export function Session() {
<View style={styles.home}> <View style={styles.home}>
<SafeAreaView edges={['top', 'bottom']} style={styles.sidebar}> <SafeAreaView edges={['top', 'bottom']} style={styles.sidebar}>
<SafeAreaView edges={['left']} style={styles.options}> <SafeAreaView edges={['left']} style={styles.options}>
<TouchableOpacity style={styles.option} onPress={() => openProfile(profileNav)}> <TouchableOpacity style={styles.option} onPress={openProfile}>
<Ionicons style={styles.icon} name={'user'} size={20} /> <Ionicons style={styles.icon} name={'user'} size={20} />
<Text>Profile</Text> <Text>Profile</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.option} onPress={() => openCards(cardNav)}> <TouchableOpacity style={styles.option} onPress={openCards}>
<Ionicons style={styles.icon} name={'contacts'} size={20} /> <Ionicons style={styles.icon} name={'contacts'} size={20} />
<Text>Contacts</Text> <Text>Contacts</Text>
</TouchableOpacity> </TouchableOpacity>