Bluesky app fork with some witchin' additions 馃挮
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 775a041b714c3ea5ae097f9df98c4480fee437a2 44 lines 946 B view raw
1import {useMemo} from 'react' 2import {View} from 'react-native' 3 4import {createEmbedViewRecordFromPost} from '#/state/queries/postgate/util' 5import {useResolveLinkQuery} from '#/state/queries/resolve-link' 6import {atoms as a, useTheme} from '#/alf' 7import {QuoteEmbed} from '#/components/Post/Embed' 8 9export function LazyQuoteEmbed({ 10 uri, 11 linkDisabled, 12}: { 13 uri: string 14 linkDisabled?: boolean 15}) { 16 const t = useTheme() 17 const {data} = useResolveLinkQuery(uri) 18 19 const view = useMemo(() => { 20 if (!data || data.type !== 'record' || data.kind !== 'post') return 21 return createEmbedViewRecordFromPost(data.view) 22 }, [data]) 23 24 return view ? ( 25 <QuoteEmbed 26 embed={{ 27 type: 'post', 28 view, 29 }} 30 linkDisabled={linkDisabled} 31 /> 32 ) : ( 33 <View 34 style={[ 35 a.w_full, 36 a.rounded_md, 37 t.atoms.bg_contrast_25, 38 { 39 height: 68, 40 }, 41 ]} 42 /> 43 ) 44}