Various small fixes
parent
3d91cf3137
commit
5eddbcea16
|
@ -185,8 +185,8 @@ export function makeValidHandle(str: string): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createFullHandle(name: string, domain: string): string {
|
export function createFullHandle(name: string, domain: string): string {
|
||||||
name = name.replace(/[\.]+$/, '')
|
name = (name || '').replace(/[\.]+$/, '')
|
||||||
domain = domain.replace(/^[\.]+/, '')
|
domain = (domain || '').replace(/^[\.]+/, '')
|
||||||
return `${name}.${domain}`
|
return `${name}.${domain}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,9 @@ const User = ({
|
||||||
{follow ? (
|
{follow ? (
|
||||||
<TouchableOpacity onPress={() => onPressUnfollow(item)}>
|
<TouchableOpacity onPress={() => onPressUnfollow(item)}>
|
||||||
<View style={[styles.btn, styles.secondaryBtn, pal.btn]}>
|
<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>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -288,7 +288,7 @@ export const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
|
||||||
<View style={styles.groupContent}>
|
<View style={styles.groupContent}>
|
||||||
<Text style={[s.white, s.p10]}>
|
<Text style={[s.white, s.p10]}>
|
||||||
Your full username will be{' '}
|
Your full username will be{' '}
|
||||||
<Text style={s.bold}>
|
<Text style={[s.white, s.bold]}>
|
||||||
@{createFullHandle(handle, userDomain)}
|
@{createFullHandle(handle, userDomain)}
|
||||||
</Text>
|
</Text>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
|
@ -63,7 +63,7 @@ export const TextLink = observer(function Link({
|
||||||
href,
|
href,
|
||||||
text,
|
text,
|
||||||
}: {
|
}: {
|
||||||
type: TypographyVariant
|
type?: TypographyVariant
|
||||||
style?: StyleProp<TextStyle>
|
style?: StyleProp<TextStyle>
|
||||||
href: string
|
href: string
|
||||||
text: string
|
text: string
|
||||||
|
|
|
@ -59,7 +59,7 @@ export const Search = ({navIdx, visible, params}: ScreenParams) => {
|
||||||
<TextInput
|
<TextInput
|
||||||
ref={textInput}
|
ref={textInput}
|
||||||
placeholder="Type your query here..."
|
placeholder="Type your query here..."
|
||||||
placeholderTextColor={pal.textLight}
|
placeholderTextColor={pal.colors.textLight}
|
||||||
selectTextOnFocus
|
selectTextOnFocus
|
||||||
returnKeyType="search"
|
returnKeyType="search"
|
||||||
style={[pal.text, styles.input]}
|
style={[pal.text, styles.input]}
|
||||||
|
|
|
@ -115,7 +115,7 @@ export const Menu = ({
|
||||||
type="h3"
|
type="h3"
|
||||||
style={[pal.text, styles.profileCardDisplayName]}
|
style={[pal.text, styles.profileCardDisplayName]}
|
||||||
numberOfLines={1}>
|
numberOfLines={1}>
|
||||||
{store.me.displayName}
|
{store.me.displayName || store.me.handle}
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
style={[pal.textLight, styles.profileCardHandle]}
|
style={[pal.textLight, styles.profileCardHandle]}
|
||||||
|
|
Loading…
Reference in New Issue