mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at no-pointer-events 59 lines 1.8 kB view raw
1import React from 'react' 2import {StyleSheet, View} from 'react-native' 3import {CreateAccountState, CreateAccountDispatch} from './state' 4import {Text} from 'view/com/util/text/Text' 5import {StepHeader} from './StepHeader' 6import {s} from 'lib/styles' 7import {TextInput} from '../util/TextInput' 8import {createFullHandle} from 'lib/strings/handles' 9import {usePalette} from 'lib/hooks/usePalette' 10import {ErrorMessage} from 'view/com/util/error/ErrorMessage' 11import {msg, Trans} from '@lingui/macro' 12import {useLingui} from '@lingui/react' 13 14/** STEP 3: Your user handle 15 * @field User handle 16 */ 17export function Step3({ 18 uiState, 19 uiDispatch, 20}: { 21 uiState: CreateAccountState 22 uiDispatch: CreateAccountDispatch 23}) { 24 const pal = usePalette('default') 25 const {_} = useLingui() 26 return ( 27 <View> 28 <StepHeader step="3" title={_(msg`Your user handle`)} /> 29 <View style={s.pb10}> 30 <TextInput 31 testID="handleInput" 32 icon="at" 33 placeholder="e.g. alice" 34 value={uiState.handle} 35 editable 36 onChange={value => uiDispatch({type: 'set-handle', value})} 37 // TODO: Add explicit text label 38 accessibilityLabel={_(msg`User handle`)} 39 accessibilityHint={_(msg`Input your user handle`)} 40 /> 41 <Text type="lg" style={[pal.text, s.pl5, s.pt10]}> 42 <Trans>Your full handle will be</Trans>{' '} 43 <Text type="lg-bold" style={[pal.text, s.ml5]}> 44 @{createFullHandle(uiState.handle, uiState.userDomain)} 45 </Text> 46 </Text> 47 </View> 48 {uiState.error ? ( 49 <ErrorMessage message={uiState.error} style={styles.error} /> 50 ) : undefined} 51 </View> 52 ) 53} 54 55const styles = StyleSheet.create({ 56 error: { 57 borderRadius: 6, 58 }, 59})