feat(country-province-city): add, edit functionality

This commit is contained in:
ghazall-ag
2025-11-17 00:40:53 +03:30
parent 77cc7534a0
commit 7cc442b600
20 changed files with 2008 additions and 280 deletions

View File

@@ -2,6 +2,7 @@ import React, { useState } from 'react';
import { useNavigate, Link } from 'react-router-dom';
import { CreditCard } from 'lucide-react';
import { forgotPassword } from '../services/api';
import { getErrorMessage, getSuccessMessage } from '../utils/errorHandler';
const ForgotPassword = () => {
const [email, setEmail] = useState('');
@@ -18,9 +19,9 @@ const ForgotPassword = () => {
try {
const res = await forgotPassword(email);
setSuccess(res?.message || 'If the email exists, a reset link was sent.');
setSuccess(getSuccessMessage(res) || 'If the email exists, a reset link was sent.');
} catch (err) {
setError(typeof err === 'string' ? err : 'Request failed. Please try again.');
setError(getErrorMessage(err));
} finally {
setLoading(false);
}