bug fix loading

This commit is contained in:
Samandar Turgunboyev
2025-11-11 16:05:22 +05:00
parent 8a4618b454
commit 64f8467f41
11 changed files with 271 additions and 155 deletions

View File

@@ -19,7 +19,7 @@ import {
FormMessage,
} from "@/shared/ui/form";
import { Input } from "@/shared/ui/input";
import { ArrowLeft, Mail, Phone, Save, User } from "lucide-react";
import { ArrowLeft, Loader2, Mail, Phone, Save, User } from "lucide-react";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { useNavigate, useParams } from "react-router-dom";
@@ -250,8 +250,14 @@ export default function EditUser() {
disabled={isPending}
className="flex-1 h-11 rounded-lg bg-gradient-to-r from-emerald-600 to-teal-700 hover:from-emerald-700 hover:to-teal-800 text-white font-medium"
>
<Save className="w-5 h-5 mr-2" />
{t("Yangilash")}
{isPending ? (
<Loader2 className="animate-spin" />
) : (
<>
<Save className="w-5 h-5 mr-2" />
{t("Yangilash")}
</>
)}
</Button>
</div>
</form>