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

Configure Feed

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

at main 49 lines 1.4 kB view raw
1import {type GestureResponderEvent, View} from 'react-native' 2import {msg} from '@lingui/core/macro' 3import {useLingui} from '@lingui/react' 4import {Trans} from '@lingui/react/macro' 5 6import {TIMELINE_SAVED_FEED} from '#/lib/constants' 7import {useAddSavedFeedsMutation} from '#/state/queries/preferences' 8import {atoms as a, useTheme} from '#/alf' 9import {InlineLinkText} from '#/components/Link' 10import {Text} from '#/components/Typography' 11 12export function NoFollowingFeed({onAddFeed}: {onAddFeed?: () => void}) { 13 const t = useTheme() 14 const {_} = useLingui() 15 const {mutateAsync: addSavedFeeds} = useAddSavedFeedsMutation() 16 17 const addRecommendedFeeds = (e: GestureResponderEvent) => { 18 e.preventDefault() 19 20 addSavedFeeds([ 21 { 22 ...TIMELINE_SAVED_FEED, 23 pinned: true, 24 }, 25 ]) 26 27 onAddFeed?.() 28 29 // prevent navigation 30 return false as const 31 } 32 33 return ( 34 <View style={[a.flex_row, a.flex_wrap, a.align_center, a.py_md, a.px_lg]}> 35 <Text style={[a.leading_snug, t.atoms.text_contrast_medium]}> 36 <Trans> 37 Looks like you're missing a following feed.{' '} 38 <InlineLinkText 39 to="#" 40 label={_(msg`Add the default feed of only people you follow`)} 41 onPress={addRecommendedFeeds} 42 style={[a.leading_snug]}> 43 Click here to add one. 44 </InlineLinkText> 45 </Trans> 46 </Text> 47 </View> 48 ) 49}