again
This commit is contained in:
@@ -48,7 +48,7 @@ export default function GroupCreationForm() {
|
||||
minParticipants: "",
|
||||
startDate: "",
|
||||
visibility: "PRIVATE",
|
||||
fundDistribution: "SEQUENTIAL",
|
||||
withdrawalMethod: "SEQUENTIAL",
|
||||
});
|
||||
|
||||
const [errors, setErrors] = useState<any>({}); // State for validation errors
|
||||
@@ -96,6 +96,7 @@ export default function GroupCreationForm() {
|
||||
|
||||
const handleReview = () => {
|
||||
if (validateForm()) {
|
||||
console.log("------",form)
|
||||
navigation.navigate("GroupReview", { form });
|
||||
} else {
|
||||
Alert.alert("Incomplete Form", "Please fill out all required fields correctly.");
|
||||
@@ -121,7 +122,7 @@ export default function GroupCreationForm() {
|
||||
|
||||
<Text style={styles.label}>Fund Distribution</Text>
|
||||
<View style={styles.toggleContainer}>
|
||||
{distributionTypes.map((type) => (<TouchableOpacity key={type} onPress={() => handleChange("fundDistribution", type)} style={[styles.toggleButton, form.fundDistribution === type && styles.selectedButton]}><Text style={[styles.toggleButtonText, form.fundDistribution === type && styles.selectedButtonText]}>{type.charAt(0) + type.slice(1).toLowerCase()}</Text></TouchableOpacity>))}
|
||||
{distributionTypes.map((type) => (<TouchableOpacity key={type} onPress={() => handleChange("withdrawalMethod", type)} style={[styles.toggleButton, form.withdrawalMethod === type && styles.selectedButton]}><Text style={[styles.toggleButtonText, form.withdrawalMethod === type && styles.selectedButtonText]}>{type.charAt(0) + type.slice(1).toLowerCase()}</Text></TouchableOpacity>))}
|
||||
</View>
|
||||
|
||||
<View style={styles.participantsRow}>
|
||||
|
||||
Reference in New Issue
Block a user