From 28ebf3d2cb2d6884c03a79c0040a187ac62fd39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ferreiro?= Date: Wed, 30 Nov 2022 15:22:49 +0000 Subject: [PATCH] add editable button cover picture --- src/view/com/profile/ProfileHeader.tsx | 2 +- src/view/com/util/UserBanner.tsx | 49 ++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index 7a26fa1628..228b6c594a 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -152,7 +152,7 @@ export const ProfileHeader = observer(function ProfileHeader({ } return ( - + ( @@ -20,4 +30,37 @@ export function UserBanner({handle}: {handle: string}) { ) + + const handleEditBanner = useCallback(() => { + Alert.alert('TB Implemented') + }, []) + + return isMe ? ( + + {renderSvg()} + + + + + ) : ( + renderSvg() + ) } + +const styles = StyleSheet.create({ + editButtonContainer: { + position: 'absolute', + bottom: 6, + right: 6, + backgroundColor: colors.gray5, + width: 20, + height: 20, + borderRadius: 10, + alignItems: 'center', + justifyContent: 'center', + }, +})