Cleanup unused props
This commit is contained in:
@@ -174,7 +174,6 @@ export function MessageInputEmbed({
|
|||||||
showAvatar
|
showAvatar
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
authorHasWarning={!!post.author.labels?.length}
|
|
||||||
timestamp={post.indexedAt}
|
timestamp={post.indexedAt}
|
||||||
postHref={itemHref}
|
postHref={itemHref}
|
||||||
style={a.flex_0}
|
style={a.flex_0}
|
||||||
|
|||||||
@@ -558,7 +558,6 @@ let PostThreadItemLoaded = ({
|
|||||||
<PostMeta
|
<PostMeta
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
authorHasWarning={!!post.author.labels?.length}
|
|
||||||
timestamp={post.indexedAt}
|
timestamp={post.indexedAt}
|
||||||
postHref={postHref}
|
postHref={postHref}
|
||||||
showAvatar={isThreadedChild}
|
showAvatar={isThreadedChild}
|
||||||
|
|||||||
@@ -174,7 +174,6 @@ function PostInner({
|
|||||||
<PostMeta
|
<PostMeta
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
authorHasWarning={!!post.author.labels?.length}
|
|
||||||
timestamp={post.indexedAt}
|
timestamp={post.indexedAt}
|
||||||
postHref={itemHref}
|
postHref={itemHref}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -369,7 +369,6 @@ let FeedItemInner = ({
|
|||||||
<PostMeta
|
<PostMeta
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
authorHasWarning={!!post.author.labels?.length}
|
|
||||||
timestamp={post.indexedAt}
|
timestamp={post.indexedAt}
|
||||||
postHref={href}
|
postHref={href}
|
||||||
onOpenAuthor={onOpenAuthor}
|
onOpenAuthor={onOpenAuthor}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, {memo, useCallback} from 'react'
|
import React, {memo, useCallback} from 'react'
|
||||||
import {StyleProp, TextStyle, View, ViewStyle} from 'react-native'
|
import {StyleProp, View, ViewStyle} from 'react-native'
|
||||||
import {AppBskyActorDefs, ModerationDecision, ModerationUI} from '@atproto/api'
|
import {AppBskyActorDefs, ModerationDecision, ModerationUI} from '@atproto/api'
|
||||||
import {msg} from '@lingui/macro'
|
import {msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
@@ -22,16 +22,11 @@ import {PreviewableUserAvatar} from './UserAvatar'
|
|||||||
interface PostMetaOpts {
|
interface PostMetaOpts {
|
||||||
author: AppBskyActorDefs.ProfileViewBasic
|
author: AppBskyActorDefs.ProfileViewBasic
|
||||||
moderation: ModerationDecision | undefined
|
moderation: ModerationDecision | undefined
|
||||||
/**
|
|
||||||
* @deprecated not in use for 6+ months
|
|
||||||
*/
|
|
||||||
authorHasWarning: boolean
|
|
||||||
postHref: string
|
postHref: string
|
||||||
timestamp: string
|
timestamp: string
|
||||||
showAvatar?: boolean
|
showAvatar?: boolean
|
||||||
avatarModeration?: ModerationUI
|
avatarModeration?: ModerationUI
|
||||||
avatarSize?: number
|
avatarSize?: number
|
||||||
displayNameStyle?: StyleProp<TextStyle>
|
|
||||||
onOpenAuthor?: () => void
|
onOpenAuthor?: () => void
|
||||||
style?: StyleProp<ViewStyle>
|
style?: StyleProp<ViewStyle>
|
||||||
}
|
}
|
||||||
@@ -75,7 +70,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
|
|||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<ProfileHoverCard inline did={opts.author.did}>
|
<ProfileHoverCard inline did={opts.author.did}>
|
||||||
<Text numberOfLines={1} style={[a.flex_shrink, opts.displayNameStyle]}>
|
<Text numberOfLines={1} style={[a.flex_shrink]}>
|
||||||
<WebOnlyInlineLinkText
|
<WebOnlyInlineLinkText
|
||||||
to={profileLink}
|
to={profileLink}
|
||||||
label={_(msg`View profile`)}
|
label={_(msg`View profile`)}
|
||||||
|
|||||||
@@ -24,15 +24,15 @@ import {useLingui} from '@lingui/react'
|
|||||||
import {useQueryClient} from '@tanstack/react-query'
|
import {useQueryClient} from '@tanstack/react-query'
|
||||||
|
|
||||||
import {HITSLOP_20} from '#/lib/constants'
|
import {HITSLOP_20} from '#/lib/constants'
|
||||||
|
import {usePalette} from '#/lib/hooks/usePalette'
|
||||||
|
import {InfoCircleIcon} from '#/lib/icons'
|
||||||
import {moderatePost_wrapped} from '#/lib/moderatePost_wrapped'
|
import {moderatePost_wrapped} from '#/lib/moderatePost_wrapped'
|
||||||
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
import {s} from '#/lib/styles'
|
import {s} from '#/lib/styles'
|
||||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||||
|
import {precacheProfile} from '#/state/queries/profile'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {ComposerOptsQuote} from '#/state/shell/composer'
|
||||||
import {InfoCircleIcon} from 'lib/icons'
|
|
||||||
import {makeProfileLink} from 'lib/routes/links'
|
|
||||||
import {precacheProfile} from 'state/queries/profile'
|
|
||||||
import {ComposerOptsQuote} from 'state/shell/composer'
|
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {ContentHider} from '../../../../components/moderation/ContentHider'
|
import {ContentHider} from '../../../../components/moderation/ContentHider'
|
||||||
@@ -238,7 +238,6 @@ export function QuoteEmbed({
|
|||||||
author={quote.author}
|
author={quote.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
showAvatar
|
showAvatar
|
||||||
authorHasWarning={false}
|
|
||||||
postHref={itemHref}
|
postHref={itemHref}
|
||||||
timestamp={quote.indexedAt}
|
timestamp={quote.indexedAt}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user