dont show count if there are no items yet

This commit is contained in:
Hailey
2024-06-11 14:16:45 -07:00
parent 4b737f80af
commit 25cc84b793
+8 -21
View File
@@ -511,11 +511,13 @@ function Footer({
}, },
], ],
]}> ]}>
{items.length > 0 && (
<View style={[a.absolute, {right: 14, top: 23}]}> <View style={[a.absolute, {right: 14, top: 23}]}>
<Text style={[a.font_bold]}> <Text style={[a.font_bold]}>
{items.length}/{state.currentStep === 'Profiles' ? 50 : 3} {items.length}/{state.currentStep === 'Profiles' ? 50 : 3}
</Text> </Text>
</View> </View>
)}
<View style={[a.flex_row, a.gap_xs]}> <View style={[a.flex_row, a.gap_xs]}>
<View style={[a.flex_row]}> <View style={[a.flex_row]}>
@@ -533,24 +535,13 @@ function Footer({
{items.length === 0 ? ( {items.length === 0 ? (
<View style={[a.gap_sm]}> <View style={[a.gap_sm]}>
<Text style={[a.font_bold, a.text_center, textStyles]}> <Text style={[a.font_bold, a.text_center, textStyles]}>
{state.currentStep === 'Profiles' ? ( <Trans>Optionally, add some feeds to your starter pack!</Trans>
<Trans>You haven't added anyone to your starter pack yet!</Trans>
) : (
<Trans>You haven't added any suggested feeds yet!</Trans>
)}
</Text> </Text>
<Text style={[a.text_center, textStyles]}> <Text style={[a.text_center, textStyles]}>
{state.currentStep === 'Profiles' ? (
<Trans>
Search for people that you want to suggest to others, or skip
for now and add some later.
</Trans>
) : (
<Trans> <Trans>
Search for feeds that you want to suggest to others, or skip for Search for feeds that you want to suggest to others, or skip for
now and add some later. now and add some later.
</Trans> </Trans>
)}
</Text> </Text>
</View> </View>
) : ( ) : (
@@ -584,15 +575,9 @@ function Footer({
)} )}
</Text> </Text>
)} )}
{isEditEnabled && (
<View <View
style={[ style={[a.flex_row, a.w_full, a.justify_between, {marginTop: 'auto'}]}>
a.flex_row, {isEditEnabled ? (
a.w_full,
a.justify_between,
{marginTop: 'auto'},
]}>
<Button <Button
label={_(msg`Edit`)} label={_(msg`Edit`)}
variant="ghost" variant="ghost"
@@ -603,6 +588,9 @@ function Footer({
<Trans>Edit</Trans> <Trans>Edit</Trans>
</ButtonText> </ButtonText>
</Button> </Button>
) : (
<View />
)}
<Button <Button
label={nextBtnText} label={nextBtnText}
variant="solid" variant="solid"
@@ -614,7 +602,6 @@ function Footer({
{state.processing && <Loader size="xs" style={{color: 'white'}} />} {state.processing && <Loader size="xs" style={{color: 'white'}} />}
</Button> </Button>
</View> </View>
)}
<WizardEditListDialog <WizardEditListDialog
control={editDialogControl} control={editDialogControl}