min items
This commit is contained in:
@@ -536,6 +536,8 @@ function Footer({
|
|||||||
(state.currentStep === 'Profiles' && items.length > 1) ||
|
(state.currentStep === 'Profiles' && items.length > 1) ||
|
||||||
(state.currentStep === 'Feeds' && items.length > 0)
|
(state.currentStep === 'Feeds' && items.length > 0)
|
||||||
|
|
||||||
|
const minimumItems = state.currentStep === 'Profiles' ? 8 : 0
|
||||||
|
|
||||||
const textStyles = [a.text_md]
|
const textStyles = [a.text_md]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -562,7 +564,7 @@ function Footer({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
]}>
|
]}>
|
||||||
{items.length > 0 && (
|
{items.length > minimumItems && (
|
||||||
<View style={[a.absolute, {right: 14, top: 31}]}>
|
<View style={[a.absolute, {right: 14, top: 31}]}>
|
||||||
<Text style={[a.font_bold]}>
|
<Text style={[a.font_bold]}>
|
||||||
{items.length}/{state.currentStep === 'Profiles' ? 50 : 3}
|
{items.length}/{state.currentStep === 'Profiles' ? 50 : 3}
|
||||||
@@ -631,8 +633,28 @@ function Footer({
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
{state.currentStep === 'Profiles' && items.length < 8 && !__DEV__ ? (
|
||||||
|
<Text
|
||||||
|
style={[
|
||||||
|
a.font_bold,
|
||||||
|
textStyles,
|
||||||
|
t.atoms.text_contrast_medium,
|
||||||
|
{marginTop: 'auto'},
|
||||||
|
]}>
|
||||||
|
<Trans>
|
||||||
|
Add {8 - items.length} more{' '}
|
||||||
|
<Plural value={8 - items.length} one="person" other="people" /> to
|
||||||
|
continue
|
||||||
|
</Trans>
|
||||||
|
</Text>
|
||||||
|
) : (
|
||||||
<View
|
<View
|
||||||
style={[a.flex_row, a.w_full, a.justify_between, {marginTop: 'auto'}]}>
|
style={[
|
||||||
|
a.flex_row,
|
||||||
|
a.w_full,
|
||||||
|
a.justify_between,
|
||||||
|
{marginTop: 'auto'},
|
||||||
|
]}>
|
||||||
{isEditEnabled ? (
|
{isEditEnabled ? (
|
||||||
<Button
|
<Button
|
||||||
label={_(msg`Edit`)}
|
label={_(msg`Edit`)}
|
||||||
@@ -658,6 +680,7 @@ 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}
|
||||||
|
|||||||
Reference in New Issue
Block a user