Rename component to match new behavior

zio/stable
Paul Frazee 2023-10-30 17:44:58 -07:00
parent 871ded193c
commit 9826e7c7b9
4 changed files with 11 additions and 11 deletions

View File

@ -9,7 +9,7 @@ import {
} from '@fortawesome/react-native-fontawesome' } from '@fortawesome/react-native-fontawesome'
import {PostsFeedItemModel} from 'state/models/feeds/post' import {PostsFeedItemModel} from 'state/models/feeds/post'
import {FeedSourceInfo} from 'lib/api/feed/types' import {FeedSourceInfo} from 'lib/api/feed/types'
import {Link, DesktopWebTextLink} from '../util/Link' import {Link, TextLinkOnWebOnly} from '../util/Link'
import {Text} from '../util/text/Text' import {Text} from '../util/text/Text'
import {UserInfoText} from '../util/UserInfoText' import {UserInfoText} from '../util/UserInfoText'
import {PostMeta} from '../util/PostMeta' import {PostMeta} from '../util/PostMeta'
@ -189,7 +189,7 @@ export const FeedItem = observer(function FeedItemImpl({
lineHeight={1.2} lineHeight={1.2}
numberOfLines={1}> numberOfLines={1}>
From{' '} From{' '}
<DesktopWebTextLink <TextLinkOnWebOnly
type="sm-bold" type="sm-bold"
style={pal.textLight} style={pal.textLight}
lineHeight={1.2} lineHeight={1.2}
@ -220,7 +220,7 @@ export const FeedItem = observer(function FeedItemImpl({
lineHeight={1.2} lineHeight={1.2}
numberOfLines={1}> numberOfLines={1}>
Reposted by{' '} Reposted by{' '}
<DesktopWebTextLink <TextLinkOnWebOnly
type="sm-bold" type="sm-bold"
style={pal.textLight} style={pal.textLight}
lineHeight={1.2} lineHeight={1.2}

View File

@ -221,7 +221,7 @@ export const TextLink = memo(function TextLink({
/** /**
* Only acts as a link on desktop web * Only acts as a link on desktop web
*/ */
interface DesktopWebTextLinkProps extends TextProps { interface TextLinkOnWebOnlyProps extends TextProps {
testID?: string testID?: string
type?: TypographyVariant type?: TypographyVariant
style?: StyleProp<TextStyle> style?: StyleProp<TextStyle>
@ -234,7 +234,7 @@ interface DesktopWebTextLinkProps extends TextProps {
accessibilityHint?: string accessibilityHint?: string
title?: string title?: string
} }
export const DesktopWebTextLink = memo(function DesktopWebTextLink({ export const TextLinkOnWebOnly = memo(function DesktopWebTextLink({
testID, testID,
type = 'md', type = 'md',
style, style,
@ -243,7 +243,7 @@ export const DesktopWebTextLink = memo(function DesktopWebTextLink({
numberOfLines, numberOfLines,
lineHeight, lineHeight,
...props ...props
}: DesktopWebTextLinkProps) { }: TextLinkOnWebOnlyProps) {
if (isWeb) { if (isWeb) {
return ( return (
<TextLink <TextLink

View File

@ -1,7 +1,7 @@
import React from 'react' import React from 'react'
import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native' import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native'
import {Text} from './text/Text' import {Text} from './text/Text'
import {DesktopWebTextLink} from './Link' import {TextLinkOnWebOnly} from './Link'
import {niceDate} from 'lib/strings/time' import {niceDate} from 'lib/strings/time'
import {usePalette} from 'lib/hooks/usePalette' import {usePalette} from 'lib/hooks/usePalette'
import {TypographyVariant} from 'lib/ThemeContext' import {TypographyVariant} from 'lib/ThemeContext'
@ -47,7 +47,7 @@ export const PostMeta = observer(function PostMetaImpl(opts: PostMetaOpts) {
</View> </View>
)} )}
<View style={styles.maxWidth}> <View style={styles.maxWidth}>
<DesktopWebTextLink <TextLinkOnWebOnly
type={opts.displayNameType || 'lg-bold'} type={opts.displayNameType || 'lg-bold'}
style={[pal.text, opts.displayNameStyle]} style={[pal.text, opts.displayNameStyle]}
numberOfLines={1} numberOfLines={1}
@ -78,7 +78,7 @@ export const PostMeta = observer(function PostMetaImpl(opts: PostMetaOpts) {
)} )}
<TimeElapsed timestamp={opts.timestamp}> <TimeElapsed timestamp={opts.timestamp}>
{({timeElapsed}) => ( {({timeElapsed}) => (
<DesktopWebTextLink <TextLinkOnWebOnly
type="md" type="md"
style={pal.textLight} style={pal.textLight}
lineHeight={1.2} lineHeight={1.2}

View File

@ -1,7 +1,7 @@
import React, {useState, useEffect} from 'react' import React, {useState, useEffect} from 'react'
import {AppBskyActorGetProfile as GetProfile} from '@atproto/api' import {AppBskyActorGetProfile as GetProfile} from '@atproto/api'
import {StyleProp, StyleSheet, TextStyle} from 'react-native' import {StyleProp, StyleSheet, TextStyle} from 'react-native'
import {DesktopWebTextLink} from './Link' import {TextLinkOnWebOnly} from './Link'
import {Text} from './text/Text' import {Text} from './text/Text'
import {LoadingPlaceholder} from './LoadingPlaceholder' import {LoadingPlaceholder} from './LoadingPlaceholder'
import {useStores} from 'state/index' import {useStores} from 'state/index'
@ -65,7 +65,7 @@ export function UserInfoText({
) )
} else if (profile) { } else if (profile) {
inner = ( inner = (
<DesktopWebTextLink <TextLinkOnWebOnly
type={type} type={type}
style={style} style={style}
lineHeight={1.2} lineHeight={1.2}