Various small fixes

zio/stable
Paul Frazee 2022-12-30 15:32:07 -06:00
parent 3d91cf3137
commit 5eddbcea16
6 changed files with 9 additions and 7 deletions

View File

@ -185,8 +185,8 @@ export function makeValidHandle(str: string): string {
}
export function createFullHandle(name: string, domain: string): string {
name = name.replace(/[\.]+$/, '')
domain = domain.replace(/^[\.]+/, '')
name = (name || '').replace(/[\.]+$/, '')
domain = (domain || '').replace(/^[\.]+/, '')
return `${name}.${domain}`
}

View File

@ -167,7 +167,9 @@ const User = ({
{follow ? (
<TouchableOpacity onPress={() => onPressUnfollow(item)}>
<View style={[styles.btn, styles.secondaryBtn, pal.btn]}>
<Text style={[s.gray5, s.fw600, s.f15]}>Unfollow</Text>
<Text type="button" style={pal.text}>
Unfollow
</Text>
</View>
</TouchableOpacity>
) : (

View File

@ -288,7 +288,7 @@ export const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
<View style={styles.groupContent}>
<Text style={[s.white, s.p10]}>
Your full username will be{' '}
<Text style={s.bold}>
<Text style={[s.white, s.bold]}>
@{createFullHandle(handle, userDomain)}
</Text>
</Text>

View File

@ -63,7 +63,7 @@ export const TextLink = observer(function Link({
href,
text,
}: {
type: TypographyVariant
type?: TypographyVariant
style?: StyleProp<TextStyle>
href: string
text: string

View File

@ -59,7 +59,7 @@ export const Search = ({navIdx, visible, params}: ScreenParams) => {
<TextInput
ref={textInput}
placeholder="Type your query here..."
placeholderTextColor={pal.textLight}
placeholderTextColor={pal.colors.textLight}
selectTextOnFocus
returnKeyType="search"
style={[pal.text, styles.input]}

View File

@ -115,7 +115,7 @@ export const Menu = ({
type="h3"
style={[pal.text, styles.profileCardDisplayName]}
numberOfLines={1}>
{store.me.displayName}
{store.me.displayName || store.me.handle}
</Text>
<Text
style={[pal.textLight, styles.profileCardHandle]}