From 192fcd1b6cfdc7a820446bcf122da97fb744ffb7 Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Tue, 22 Oct 2024 16:41:31 -0700 Subject: [PATCH] connecting contact screen --- app/client/mobile/src/profile/Profile.tsx | 16 ++++++++++++++-- app/client/mobile/src/session/Session.tsx | 12 ++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/app/client/mobile/src/profile/Profile.tsx b/app/client/mobile/src/profile/Profile.tsx index fc551452..808cf8f5 100644 --- a/app/client/mobile/src/profile/Profile.tsx +++ b/app/client/mobile/src/profile/Profile.tsx @@ -1,4 +1,8 @@ import React from 'react'; +import { IconButton } from 'react-native-paper'; +import { SafeAreaView, View } from 'react-native'; +import { styles } from './Profile.styled'; +import { useProfile } from './useProfile.hook'; export type ContactParams = { guid: string; @@ -13,6 +17,14 @@ export type ContactParams = { offsync?: boolean; } -export function Profile() { - return <>; +export function Profile({ close }) { + return ( + + + { close && ( + + )} + + + ) } diff --git a/app/client/mobile/src/session/Session.tsx b/app/client/mobile/src/session/Session.tsx index b1903286..9dee446c 100644 --- a/app/client/mobile/src/session/Session.tsx +++ b/app/client/mobile/src/session/Session.tsx @@ -108,10 +108,13 @@ function ContactTab({ scheme }: { scheme: string }) { - {(props) => {props.navigation.navigate('registry')}} openContact={(params: ContactParams)=>{console.log('opencon', params)}} />} + {(props) => {props.navigation.navigate('registry')}} openContact={(params: ContactParams)=>{props.navigation.navigate('profile')}} />} - {(props) => {console.log('opencon', params)}} />} + {(props) => {props.navigation.navigate('profile')}} />} + + + {(props) => } @@ -143,6 +146,7 @@ function ProfileScreen({nav}) { id="ProfileDrawer" drawerContent={Profile} screenOptions={{ + drawerStyle: {width: 300}, drawerPosition: 'right', drawerType: 'front', headerShown: false, @@ -162,7 +166,7 @@ function RegistryScreen({nav}) { id="RegistryDrawer" drawerContent={() => ( - {console.log('opencon', params)}} /> + {nav.profile.openDrawer()}} /> )} screenOptions={{ @@ -186,7 +190,7 @@ function ContactsScreen({nav}) { id="ContactsDrawer" drawerContent={() => ( - {nav.registry.openDrawer()}} openContact={(params: ContactParams)=>{console.log('opencon', params)}} /> + {nav.profile.openDrawer()}} /> )} screenOptions={{