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 {Fragment, type ReactNode} from 'react'
|
||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import {AtUri} from '@atproto/api'
|
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 {toNiceDomain} from '#/lib/strings/url-helpers'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {InlineLinkText} from '#/components/Link'
|
|
||||||
import {
|
import {
|
||||||
matchStandardSitePublisher,
|
matchStandardSitePublisher,
|
||||||
matchStandardSitePublisherByUri,
|
matchStandardSitePublisherByUri,
|
||||||
@@ -17,19 +15,15 @@ import {
|
|||||||
isStandardSitePublicationUri,
|
isStandardSitePublicationUri,
|
||||||
} from '#/components/Post/Embed/StandardSiteEmbed/utils'
|
} from '#/components/Post/Embed/StandardSiteEmbed/utils'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {useAnalytics} from '#/analytics'
|
|
||||||
|
|
||||||
export function StandardSiteMetaRow({
|
export function StandardSiteMetaRow({
|
||||||
type = 'document',
|
type = 'document',
|
||||||
preview,
|
|
||||||
view,
|
view,
|
||||||
}: ssTypes.CommonProps &
|
}: ssTypes.CommonProps &
|
||||||
ssTypes.PreviewProps & {
|
ssTypes.PreviewProps & {
|
||||||
type?: 'document' | 'publication'
|
type?: 'document' | 'publication'
|
||||||
}) {
|
}) {
|
||||||
const ax = useAnalytics()
|
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {t: l} = useLingui()
|
|
||||||
const highlightedPublisher = !!matchStandardSitePublisher(view)
|
const highlightedPublisher = !!matchStandardSitePublisher(view)
|
||||||
const didsFromRecords =
|
const didsFromRecords =
|
||||||
view.associatedRefs
|
view.associatedRefs
|
||||||
@@ -80,25 +74,7 @@ export function StandardSiteMetaRow({
|
|||||||
key: 'author',
|
key: 'author',
|
||||||
node: (
|
node: (
|
||||||
<Text numberOfLines={1} style={[metaTextStyle]}>
|
<Text numberOfLines={1} style={[metaTextStyle]}>
|
||||||
<Trans>
|
<Trans>by @{authorProfile.handle}</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>
|
|
||||||
</Text>
|
</Text>
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user