diff options
Diffstat (limited to 'src/components')
4 files changed, 37 insertions, 33 deletions
diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx index 095136944..2994d6c48 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx @@ -3,7 +3,9 @@ import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {atoms as a, useTheme} from '#/alf' -import {Button, ButtonText} from '#/components/Button' +import {Button, ButtonIcon, ButtonText} from '#/components/Button' +import {ArrowRotateCounterClockwise_Stroke2_Corner0_Rounded as ArrowRotateIcon} from '#/components/icons/ArrowRotateCounterClockwise' +import {MediaInsetBorder} from '#/components/MediaInsetBorder' import {Text as TypoText} from '#/components/Typography' export function Container({children}: {children: React.ReactNode}) { @@ -16,12 +18,12 @@ export function Container({children}: {children: React.ReactNode}) { a.justify_center, a.align_center, a.px_lg, - a.border, - t.atoms.border_contrast_low, - a.rounded_sm, + a.rounded_md, + a.overflow_hidden, a.gap_lg, ]}> {children} + <MediaInsetBorder /> </View> ) } @@ -50,8 +52,8 @@ export function RetryButton({onPress}: {onPress: () => void}) { onPress={onPress} size="small" color="secondary_inverted" - variant="solid" label={_(msg`Retry`)}> + <ButtonIcon icon={ArrowRotateIcon} /> <ButtonText> <Trans>Retry</Trans> </ButtonText> diff --git a/src/components/Post/Embed/VideoEmbed/index.web.tsx b/src/components/Post/Embed/VideoEmbed/index.web.tsx index 25f9f4604..e988bc830 100644 --- a/src/components/Post/Embed/VideoEmbed/index.web.tsx +++ b/src/components/Post/Embed/VideoEmbed/index.web.tsx @@ -86,7 +86,13 @@ export function VideoEmbed({ const contents = ( <div ref={ref} - style={{display: 'flex', flex: 1, cursor: 'default'}} + style={{ + display: 'flex', + flex: 1, + cursor: 'default', + backgroundImage: `url(${embed.thumbnail})`, + backgroundSize: 'cover', + }} onClick={evt => evt.stopPropagation()}> <ErrorBoundary renderError={renderError} key={key}> <OnlyNearScreen> diff --git a/src/components/StarterPack/ProfileStarterPacks.tsx b/src/components/StarterPack/ProfileStarterPacks.tsx index bbe0bc52b..7252a1162 100644 --- a/src/components/StarterPack/ProfileStarterPacks.tsx +++ b/src/components/StarterPack/ProfileStarterPacks.tsx @@ -1,13 +1,9 @@ -import React, { - useCallback, - useEffect, - useImperativeHandle, - useState, -} from 'react' +import {useCallback, useEffect, useImperativeHandle, useState} from 'react' import { findNodeHandle, type ListRenderItemInfo, type StyleProp, + useWindowDimensions, View, type ViewStyle, } from 'react-native' @@ -42,6 +38,7 @@ interface SectionRef { } interface ProfileFeedgensProps { + ref?: React.Ref<SectionRef> scrollElRef: ListRef did: string headerOffset: number @@ -56,24 +53,20 @@ function keyExtractor(item: AppBskyGraphDefs.StarterPackView) { return item.uri } -export const ProfileStarterPacks = React.forwardRef< - SectionRef, - ProfileFeedgensProps ->(function ProfileFeedgensImpl( - { - scrollElRef, - did, - headerOffset, - enabled, - style, - testID, - setScrollViewTag, - isMe, - }, +export function ProfileStarterPacks({ ref, -) { + scrollElRef, + did, + headerOffset, + enabled, + style, + testID, + setScrollViewTag, + isMe, +}: ProfileFeedgensProps) { const t = useTheme() const bottomBarOffset = useBottomBarOffset(100) + const {height} = useWindowDimensions() const [isPTRing, setIsPTRing] = useState(false) const { data, @@ -101,7 +94,7 @@ export const ProfileStarterPacks = React.forwardRef< setIsPTRing(false) }, [refetch, setIsPTRing]) - const onEndReached = React.useCallback(async () => { + const onEndReached = useCallback(async () => { if (isFetchingNextPage || !hasNextPage || isError) return try { await fetchNextPage() @@ -144,7 +137,10 @@ export const ProfileStarterPacks = React.forwardRef< refreshing={isPTRing} headerOffset={headerOffset} progressViewOffset={ios(0)} - contentContainerStyle={{paddingBottom: headerOffset + bottomBarOffset}} + contentContainerStyle={{ + minHeight: height + headerOffset, + paddingBottom: bottomBarOffset, + }} removeClippedSubviews={true} desktopFixedHeight onEndReached={onEndReached} @@ -158,7 +154,7 @@ export const ProfileStarterPacks = React.forwardRef< /> </View> ) -}) +} function CreateAnother() { const {_} = useLingui() diff --git a/src/components/verification/VerificationCheckButton.tsx b/src/components/verification/VerificationCheckButton.tsx index 3f3bb2095..45449f43c 100644 --- a/src/components/verification/VerificationCheckButton.tsx +++ b/src/components/verification/VerificationCheckButton.tsx @@ -99,15 +99,15 @@ export function Badge({ : _(msg`View this user's verifications`) } hitSlop={20} - onPress={() => { + onPress={evt => { + evt.preventDefault() logger.metric('verification:badge:click', {}, {statsig: true}) if (state.profile.role === 'verifier') { verifierDialogControl.open() } else { verificationsDialogControl.open() } - }} - style={[]}> + }}> {({hovered}) => ( <View style={[ |