diff options
Diffstat (limited to 'src/components/ProgressGuide/List.tsx')
-rw-r--r-- | src/components/ProgressGuide/List.tsx | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/src/components/ProgressGuide/List.tsx b/src/components/ProgressGuide/List.tsx index 299d1e69f..bbc5a0177 100644 --- a/src/components/ProgressGuide/List.tsx +++ b/src/components/ProgressGuide/List.tsx @@ -10,12 +10,15 @@ import {atoms as a, useTheme} from '#/alf' import {Button, ButtonIcon} from '#/components/Button' import {TimesLarge_Stroke2_Corner0_Rounded as Times} from '#/components/icons/Times' import {Text} from '#/components/Typography' +import {FollowDialog} from './FollowDialog' import {ProgressGuideTask} from './Task' export function ProgressGuideList({style}: {style?: StyleProp<ViewStyle>}) { const t = useTheme() const {_} = useLingui() - const guide = useProgressGuide('like-10-and-follow-7') + const followProgressGuide = useProgressGuide('follow-10') + const followAndLikeProgressGuide = useProgressGuide('like-10-and-follow-7') + const guide = followProgressGuide || followAndLikeProgressGuide const {endProgressGuide} = useProgressGuideControls() if (guide) { @@ -41,18 +44,33 @@ export function ProgressGuideList({style}: {style?: StyleProp<ViewStyle>}) { <ButtonIcon icon={Times} size="sm" /> </Button> </View> - <ProgressGuideTask - current={guide.numLikes + 1} - total={10 + 1} - title={_(msg`Like 10 posts`)} - subtitle={_(msg`Teach our algorithm what you like`)} - /> - <ProgressGuideTask - current={guide.numFollows + 1} - total={7 + 1} - title={_(msg`Follow 7 accounts`)} - subtitle={_(msg`Bluesky is better with friends!`)} - /> + {guide.guide === 'follow-10' && ( + <> + <ProgressGuideTask + current={guide.numFollows + 1} + total={10 + 1} + title={_(msg`Follow 10 accounts`)} + subtitle={_(msg`Bluesky is better with friends!`)} + /> + <FollowDialog guide={guide} /> + </> + )} + {guide.guide === 'like-10-and-follow-7' && ( + <> + <ProgressGuideTask + current={guide.numLikes + 1} + total={10 + 1} + title={_(msg`Like 10 posts`)} + subtitle={_(msg`Teach our algorithm what you like`)} + /> + <ProgressGuideTask + current={guide.numFollows + 1} + total={7 + 1} + title={_(msg`Follow 7 accounts`)} + subtitle={_(msg`Bluesky is better with friends!`)} + /> + </> + )} </View> ) } |