Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798import {useCallback} from 'react'import {StyleSheet, View} from 'react-native'import {Trans, useLingui} from '@lingui/react/macro'import {useNavigation} from '@react-navigation/native'
import {usePalette} from '#/lib/hooks/usePalette'import {MagnifyingGlassIcon} from '#/lib/icons'import {type NavigationProp} from '#/lib/routes/types'import {s} from '#/lib/styles'import {atoms as a} from '#/alf'import {Button, ButtonIcon, ButtonText} from '#/components/Button'import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRightIcon} from '#/components/icons/Chevron'import {IS_WEB} from '#/env'import {Text} from '../util/text/Text'
export function FollowingEmptyState() { const {t: l} = useLingui() const pal = usePalette('default') const navigation = useNavigation<NavigationProp>()
const onPressFindAccounts = useCallback(() => { if (IS_WEB) { navigation.navigate('Search', {}) } else { navigation.navigate('SearchTab') navigation.popToTop() } }, [navigation])
const onPressDiscoverFeeds = useCallback(() => { navigation.navigate('Feeds') }, [navigation])
return ( <View style={styles.container}> <View style={styles.inner}> <View style={styles.iconContainer}> <MagnifyingGlassIcon style={[styles.icon, pal.text]} size={62} /> </View> <Text type="xl-medium" style={[s.textCenter, pal.text]}> <Trans> Your following feed is empty! Follow more users to see what's happening. </Trans> </Text> <View style={[a.mt_xl, a.align_center]}> <Button label={l`Find accounts to follow`} onPress={onPressFindAccounts} color="secondary_inverted" size="large"> <ButtonText> <Trans>Find accounts to follow</Trans> </ButtonText> <ButtonIcon icon={ChevronRightIcon} /> </Button> </View>
<Text type="xl-medium" style={[s.textCenter, pal.text, s.mt20]}> <Trans>You can also discover new Custom Feeds to follow.</Trans> </Text> <View style={[a.mt_md, a.align_center]}> <Button label={l`Discover new custom feeds`} onPress={onPressDiscoverFeeds} color="secondary_inverted" size="large"> <ButtonText> <Trans>Discover new custom feeds</Trans> </ButtonText> <ButtonIcon icon={ChevronRightIcon} /> </Button> </View> </View> </View> )}const styles = StyleSheet.create({ container: { height: '100%', flexDirection: 'row', justifyContent: 'center', paddingVertical: 40, paddingHorizontal: 30, }, inner: { width: '100%', maxWidth: 460, }, iconContainer: { marginBottom: 16, }, icon: { marginLeft: 'auto', marginRight: 'auto', },})