Changeset View
Changeset View
Standalone View
Standalone View
native/avatars/avatar-hooks.js
Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | ): () => void { | ||||
const insets = useSafeAreaInsets(); | const insets = useSafeAreaInsets(); | ||||
const { showActionSheetWithOptions } = useActionSheet(); | const { showActionSheetWithOptions } = useActionSheet(); | ||||
const styles = useStyles(unboundStyles); | const styles = useStyles(unboundStyles); | ||||
const showAvatarActionSheet = React.useCallback(() => { | const showAvatarActionSheet = React.useCallback(() => { | ||||
const texts = options.map((option: ShowAvatarActionSheetOptions) => { | const texts = options.map((option: ShowAvatarActionSheetOptions) => { | ||||
if (option.id === 'emoji') { | if (option.id === 'emoji') { | ||||
return 'Use Emoji'; | return 'Select emoji'; | ||||
} else if (option.id === 'image') { | } else if (option.id === 'image') { | ||||
return 'Select image'; | return 'Select image'; | ||||
} else if (option.id === 'camera') { | } else if (option.id === 'camera') { | ||||
return 'Camera'; | return 'Open camera'; | ||||
} else if (option.id === 'ens') { | } else if (option.id === 'ens') { | ||||
return 'Use ENS Avatar'; | return 'Use ENS avatar'; | ||||
} else if (option.id === 'remove') { | } else if (option.id === 'remove') { | ||||
return 'Clear avatar'; | return 'Reset to default'; | ||||
} else { | } else { | ||||
return 'Cancel'; | return 'Cancel'; | ||||
} | } | ||||
}); | }); | ||||
const cancelButtonIndex = options.findIndex( | const cancelButtonIndex = options.findIndex( | ||||
option => option.id === 'cancel', | option => option.id === 'cancel', | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |