mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
at react-sdui 61 lines 1.9 kB view raw
1import React from 'react' 2import {StyleProp, View, ViewStyle} from 'react-native' 3import {msg, Trans} from '@lingui/macro' 4import {useLingui} from '@lingui/react' 5 6import { 7 useProgressGuide, 8 useProgressGuideControls, 9} from '#/state/shell/progress-guide' 10import {atoms as a, useTheme} from '#/alf' 11import {Button, ButtonIcon} from '#/components/Button' 12import {TimesLarge_Stroke2_Corner0_Rounded as Times} from '#/components/icons/Times' 13import {Text} from '#/components/Typography' 14import {ProgressGuideTask} from './Task' 15 16export function ProgressGuideList({style}: {style?: StyleProp<ViewStyle>}) { 17 const t = useTheme() 18 const {_} = useLingui() 19 const guide = useProgressGuide('like-10-and-follow-7') 20 const {endProgressGuide} = useProgressGuideControls() 21 22 if (guide) { 23 return ( 24 <View style={[a.flex_col, a.gap_md, style]}> 25 <View style={[a.flex_row, a.align_center, a.justify_between]}> 26 <Text 27 style={[ 28 t.atoms.text_contrast_medium, 29 a.font_semibold, 30 a.text_sm, 31 {textTransform: 'uppercase'}, 32 ]}> 33 <Trans>Getting started</Trans> 34 </Text> 35 <Button 36 variant="ghost" 37 size="tiny" 38 color="secondary" 39 shape="round" 40 label={_(msg`Dismiss getting started guide`)} 41 onPress={endProgressGuide}> 42 <ButtonIcon icon={Times} size="sm" /> 43 </Button> 44 </View> 45 <ProgressGuideTask 46 current={guide.numLikes + 1} 47 total={10 + 1} 48 title={_(msg`Like 10 posts`)} 49 subtitle={_(msg`Teach our algorithm what you like`)} 50 /> 51 <ProgressGuideTask 52 current={guide.numFollows + 1} 53 total={7 + 1} 54 title={_(msg`Follow 7 accounts`)} 55 subtitle={_(msg`Bluesky is better with friends!`)} 56 /> 57 </View> 58 ) 59 } 60 return null 61}