diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-10-30 17:44:58 -0700 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-10-30 17:44:58 -0700 |
commit | 9826e7c7b99b16d77534473d822642c7cbf1f3fe (patch) | |
tree | 2cfeceb31d2c98b104ca616a2d2579793d612818 | |
parent | 871ded193ce64b3d586d4a07b326e5ee10f388b9 (diff) | |
download | voidsky-9826e7c7b99b16d77534473d822642c7cbf1f3fe.tar.zst |
Rename component to match new behavior
-rw-r--r-- | src/view/com/posts/FeedItem.tsx | 6 | ||||
-rw-r--r-- | src/view/com/util/Link.tsx | 6 | ||||
-rw-r--r-- | src/view/com/util/PostMeta.tsx | 6 | ||||
-rw-r--r-- | src/view/com/util/UserInfoText.tsx | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index 1ceae80ae..6aac450ff 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -9,7 +9,7 @@ import { } from '@fortawesome/react-native-fontawesome' import {PostsFeedItemModel} from 'state/models/feeds/post' 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 {UserInfoText} from '../util/UserInfoText' import {PostMeta} from '../util/PostMeta' @@ -189,7 +189,7 @@ export const FeedItem = observer(function FeedItemImpl({ lineHeight={1.2} numberOfLines={1}> From{' '} - <DesktopWebTextLink + <TextLinkOnWebOnly type="sm-bold" style={pal.textLight} lineHeight={1.2} @@ -220,7 +220,7 @@ export const FeedItem = observer(function FeedItemImpl({ lineHeight={1.2} numberOfLines={1}> Reposted by{' '} - <DesktopWebTextLink + <TextLinkOnWebOnly type="sm-bold" style={pal.textLight} lineHeight={1.2} diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx index 94fe75536..1777f6659 100644 --- a/src/view/com/util/Link.tsx +++ b/src/view/com/util/Link.tsx @@ -221,7 +221,7 @@ export const TextLink = memo(function TextLink({ /** * Only acts as a link on desktop web */ -interface DesktopWebTextLinkProps extends TextProps { +interface TextLinkOnWebOnlyProps extends TextProps { testID?: string type?: TypographyVariant style?: StyleProp<TextStyle> @@ -234,7 +234,7 @@ interface DesktopWebTextLinkProps extends TextProps { accessibilityHint?: string title?: string } -export const DesktopWebTextLink = memo(function DesktopWebTextLink({ +export const TextLinkOnWebOnly = memo(function DesktopWebTextLink({ testID, type = 'md', style, @@ -243,7 +243,7 @@ export const DesktopWebTextLink = memo(function DesktopWebTextLink({ numberOfLines, lineHeight, ...props -}: DesktopWebTextLinkProps) { +}: TextLinkOnWebOnlyProps) { if (isWeb) { return ( <TextLink diff --git a/src/view/com/util/PostMeta.tsx b/src/view/com/util/PostMeta.tsx index b5c47dea5..c5e438f8d 100644 --- a/src/view/com/util/PostMeta.tsx +++ b/src/view/com/util/PostMeta.tsx @@ -1,7 +1,7 @@ import React from 'react' import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native' import {Text} from './text/Text' -import {DesktopWebTextLink} from './Link' +import {TextLinkOnWebOnly} from './Link' import {niceDate} from 'lib/strings/time' import {usePalette} from 'lib/hooks/usePalette' import {TypographyVariant} from 'lib/ThemeContext' @@ -47,7 +47,7 @@ export const PostMeta = observer(function PostMetaImpl(opts: PostMetaOpts) { </View> )} <View style={styles.maxWidth}> - <DesktopWebTextLink + <TextLinkOnWebOnly type={opts.displayNameType || 'lg-bold'} style={[pal.text, opts.displayNameStyle]} numberOfLines={1} @@ -78,7 +78,7 @@ export const PostMeta = observer(function PostMetaImpl(opts: PostMetaOpts) { )} <TimeElapsed timestamp={opts.timestamp}> {({timeElapsed}) => ( - <DesktopWebTextLink + <TextLinkOnWebOnly type="md" style={pal.textLight} lineHeight={1.2} diff --git a/src/view/com/util/UserInfoText.tsx b/src/view/com/util/UserInfoText.tsx index 695711b2a..e4ca981d9 100644 --- a/src/view/com/util/UserInfoText.tsx +++ b/src/view/com/util/UserInfoText.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from 'react' import {AppBskyActorGetProfile as GetProfile} from '@atproto/api' import {StyleProp, StyleSheet, TextStyle} from 'react-native' -import {DesktopWebTextLink} from './Link' +import {TextLinkOnWebOnly} from './Link' import {Text} from './text/Text' import {LoadingPlaceholder} from './LoadingPlaceholder' import {useStores} from 'state/index' @@ -65,7 +65,7 @@ export function UserInfoText({ ) } else if (profile) { inner = ( - <DesktopWebTextLink + <TextLinkOnWebOnly type={type} style={style} lineHeight={1.2} |