bug fixed
This commit is contained in:
@@ -190,8 +190,9 @@ export default function CreateAdsScreens() {
|
||||
router.push('/(dashboard)/announcements');
|
||||
}
|
||||
},
|
||||
onError: (err) => {
|
||||
Alert.alert('Xatolik yuz berdi', err.message);
|
||||
onError: (err: AxiosError) => {
|
||||
const errMessage = (err.response?.data as { referral_amount: string }).referral_amount
|
||||
Alert.alert(t('Xatolik yuz berdi'), errMessage || err.message);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ import CategorySelection from '@/components/ui/IndustrySelection';
|
||||
import { XIcon } from 'lucide-react-native';
|
||||
import React, { forwardRef, useEffect, useImperativeHandle, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FlatList, StyleSheet, Text, ToastAndroid, TouchableOpacity, View } from 'react-native';
|
||||
import { FlatList, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { Toast } from 'toastify-react-native';
|
||||
|
||||
type StepProps = {
|
||||
formData: any;
|
||||
@@ -36,7 +37,7 @@ const StepTwo = forwardRef(({ formData, updateForm }: StepProps, ref) => {
|
||||
const validate = () => {
|
||||
if (selectedCategories.length === 0) {
|
||||
setError('Iltimos, kompaniyalarni tanlang');
|
||||
ToastAndroid.show(t('Iltimos, kompaniyalarni tanlang'), ToastAndroid.TOP);
|
||||
Toast.info(t('Iltimos, kompaniyalarni tanlang'));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user