Remove handle link, no one is tapping it and it's not great for a11y
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import {Fragment, type ReactNode} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {AtUri} from '@atproto/api'
|
||||
import {Trans, useLingui} from '@lingui/react/macro'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
|
||||
import {makeProfileLink} from '#/lib/routes/links'
|
||||
import {toNiceDomain} from '#/lib/strings/url-helpers'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {InlineLinkText} from '#/components/Link'
|
||||
import {
|
||||
matchStandardSitePublisher,
|
||||
matchStandardSitePublisherByUri,
|
||||
@@ -17,19 +15,15 @@ import {
|
||||
isStandardSitePublicationUri,
|
||||
} from '#/components/Post/Embed/StandardSiteEmbed/utils'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {useAnalytics} from '#/analytics'
|
||||
|
||||
export function StandardSiteMetaRow({
|
||||
type = 'document',
|
||||
preview,
|
||||
view,
|
||||
}: ssTypes.CommonProps &
|
||||
ssTypes.PreviewProps & {
|
||||
type?: 'document' | 'publication'
|
||||
}) {
|
||||
const ax = useAnalytics()
|
||||
const t = useTheme()
|
||||
const {t: l} = useLingui()
|
||||
const highlightedPublisher = !!matchStandardSitePublisher(view)
|
||||
const didsFromRecords =
|
||||
view.associatedRefs
|
||||
@@ -80,25 +74,7 @@ export function StandardSiteMetaRow({
|
||||
key: 'author',
|
||||
node: (
|
||||
<Text numberOfLines={1} style={[metaTextStyle]}>
|
||||
<Trans>
|
||||
by{' '}
|
||||
<InlineLinkText
|
||||
label={l`View @${authorProfile.handle}'s profile`}
|
||||
to={makeProfileLink(authorProfile)}
|
||||
style={[
|
||||
metaTextStyle,
|
||||
preview ? a.pointer_events_none : a.pointer_events_auto,
|
||||
]}
|
||||
onPress={e => {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
ax.metric('embed:standardSite:authorHandle:press', {
|
||||
handle: authorProfile.handle,
|
||||
})
|
||||
}}>
|
||||
@{authorProfile.handle}
|
||||
</InlineLinkText>
|
||||
</Trans>
|
||||
<Trans>by @{authorProfile.handle}</Trans>
|
||||
</Text>
|
||||
),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user