From 24d1bf06dbc35b3bbb5bfcab7ff8516bbcb80b7b Mon Sep 17 00:00:00 2001 From: Hailey Date: Tue, 13 Feb 2024 11:49:56 -0800 Subject: [PATCH] select/update --- src/screens/Onboarding/StepProfile/index.tsx | 31 +++++++++++++------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/screens/Onboarding/StepProfile/index.tsx b/src/screens/Onboarding/StepProfile/index.tsx index 3c83cab9f3..5ec3a78066 100644 --- a/src/screens/Onboarding/StepProfile/index.tsx +++ b/src/screens/Onboarding/StepProfile/index.tsx @@ -36,8 +36,8 @@ type AvatarPlaceholder = 'thinking' | 'heart' | 'laughing' interface Avatar { imageUri?: string - backgroundColor?: Color - placeholder?: Emoji + backgroundColor: Color + placeholder: Emoji } const AvatarContext = React.createContext({} as Avatar) @@ -53,7 +53,10 @@ export function StepProfile() { const {track} = useAnalytics() const {state, dispatch} = React.useContext(Context) const onboardDispatch = useOnboardingDispatch() - const [avatar, setAvatar] = React.useState({}) + const [avatar, setAvatar] = React.useState({ + placeholder: 'smile', + backgroundColor: 'red', + }) React.useEffect(() => { track('OnboardingV2:StepProfile:Start') @@ -78,6 +81,9 @@ export function StepProfile() { + + + @@ -119,8 +125,12 @@ function AvatarCircle() { return ( + style={[ + styles.imageContainer, + {backgroundColor: avatar.backgroundColor}, + ]}> + {emojiItems[avatar.placeholder]} + ) } @@ -185,8 +195,6 @@ function EmojiItem({emoji}: {emoji: Emoji}) { styles.imageContainer, styles.paletteContainer, { - alignItems: 'center', - justifyContent: 'center', borderWidth: avatar.placeholder === emoji ? 3 : 1, }, ]} @@ -228,12 +236,15 @@ const styles = StyleSheet.create({ imageContainer: { borderRadius: 100, height: 150, - width: 250, + width: 150, overflow: 'hidden', + borderWidth: 1, + alignItems: 'center', + justifyContent: 'center', }, paletteContainer: { - height: 90, - width: 90, + height: 80, + width: 80, marginHorizontal: 5, }, flatListOuter: {