move newskie to handle

This commit is contained in:
Hailey
2024-06-07 15:36:16 -07:00
parent 1c11bc9879
commit 150f2635b2
4 changed files with 11 additions and 8 deletions
+1 -5
View File
@@ -6,7 +6,6 @@ import {Shadow} from '#/state/cache/types'
import {sanitizeDisplayName} from 'lib/strings/display-names'
import {sanitizeHandle} from 'lib/strings/handles'
import {atoms as a, useTheme} from '#/alf'
import {NewskieDialog} from '#/components/StarterPack/NewskieDialog'
import {Text} from '#/components/Typography'
export function ProfileHeaderDisplayName({
@@ -18,7 +17,7 @@ export function ProfileHeaderDisplayName({
}) {
const t = useTheme()
return (
<View style={[a.flex_row, a.align_center, a.gap_md]}>
<View>
<Text
testID="profileHeaderDisplayName"
style={[t.atoms.text, a.text_4xl, {fontWeight: '500'}]}>
@@ -27,9 +26,6 @@ export function ProfileHeaderDisplayName({
moderation.ui('displayName'),
)}
</Text>
<View style={[a.h_full]}>
<NewskieDialog profile={profile} />
</View>
</View>
)
}
+8 -1
View File
@@ -5,7 +5,9 @@ import {Trans} from '@lingui/macro'
import {Shadow} from '#/state/cache/types'
import {isInvalidHandle} from 'lib/strings/handles'
import {isAndroid} from 'platform/detection'
import {atoms as a, useTheme, web} from '#/alf'
import {NewskieDialog} from '#/components/StarterPack/NewskieDialog'
import {Text} from '#/components/Typography'
export function ProfileHeaderHandle({
@@ -17,7 +19,12 @@ export function ProfileHeaderHandle({
const invalidHandle = isInvalidHandle(profile.handle)
const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy
return (
<View style={[a.flex_row, a.gap_xs, a.align_center]} pointerEvents="none">
<View
style={[a.flex_row, a.gap_xs, a.align_center]}
pointerEvents={isAndroid ? 'box-only' : 'auto'}>
<View style={[a.mr_xs]}>
<NewskieDialog profile={profile} />
</View>
{profile.viewer?.followedBy && !blockHide ? (
<View style={[t.atoms.bg_contrast_25, a.rounded_xs, a.px_sm, a.py_xs]}>
<Text style={[t.atoms.text, a.text_sm]}>